Commit e0c9bcce authored by 13841799530's avatar 13841799530

结束上报

解润东
20211201
parent 03e05314
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<van-button type="primary" round size="large" @click="problem(nums)" :disabled="finish=='true'?true:false">临时问题上报{{'('+nums.addTroubleNumber+')'}}</van-button> <van-button type="primary" round size="large" @click="problem(nums)" :disabled="finish=='true'?true:false">临时问题上报{{'('+nums.addTroubleNumber+')'}}</van-button>
<van-button type="primary" round size="large" @click="formwork">检查清单模板{{'('+nums.listNumber+')'}}</van-button> <van-button type="primary" round size="large" @click="formwork">检查清单模板{{'('+nums.listNumber+')'}}</van-button>
<van-button type="primary" round size="large" @click="note" :disabled="nums.troubleNumber<1?true:false">检查问题记录{{'('+nums.troubleNumber+')'}}</van-button> <van-button type="primary" round size="large" @click="note" :disabled="nums.troubleNumber<1?true:false">检查问题记录{{'('+nums.troubleNumber+')'}}</van-button>
<van-button type="info" round size="large" @click="end" :disabled="finish=='true'?true:false">结束上报</van-button> <van-button type="info" round size="large" @click="end(nums)">结束上报</van-button>
</div> </div>
<tab-bar :index="1"></tab-bar> <tab-bar :index="1"></tab-bar>
</div> </div>
...@@ -45,6 +45,7 @@ export default { ...@@ -45,6 +45,7 @@ export default {
nums:{},//问题上报清单列表 nums:{},//问题上报清单列表
text:'问题上报',//顶部文本 text:'问题上报',//顶部文本
finish:'',//提交状态 finish:'',//提交状态
submitTroubleNumber:0//问题记录问题提交数量
} }
}, },
mounted() { mounted() {
...@@ -66,6 +67,7 @@ export default { ...@@ -66,6 +67,7 @@ export default {
}else{ }else{
//当清单模板,问题列表,问题记录不进行提交操作返回该页面调用缓存数据 //当清单模板,问题列表,问题记录不进行提交操作返回该页面调用缓存数据
this.nums=JSON.parse(sessionStorage.getItem('nums')) this.nums=JSON.parse(sessionStorage.getItem('nums'))
this.submitTroubleNumber=JSON.parse(sessionStorage.getItem('submitTroubleNumber'))
} }
} }
}, },
...@@ -81,21 +83,23 @@ export default { ...@@ -81,21 +83,23 @@ export default {
this.nums=[]; this.nums=[];
getFun('check/carry/count',{planId:this.id}).then((Response)=>{ getFun('check/carry/count',{planId:this.id}).then((Response)=>{
this.$toast.clear() this.$toast.clear()
this.submitTroubleNumber=Response.data.submitTroubleNumber
this.nums=Response.data this.nums=Response.data
sessionStorage.setItem('deptNameList',JSON.stringify(Response.data.deptNameList)) sessionStorage.setItem('deptNameList',JSON.stringify(Response.data.deptNameList))
sessionStorage.setItem('deptIdList',JSON.stringify(Response.data.deptIdList)) sessionStorage.setItem('deptIdList',JSON.stringify(Response.data.deptIdList))
sessionStorage.setItem('projectFlag',Response.data.projectFlag) sessionStorage.setItem('projectFlag',Response.data.projectFlag)
sessionStorage.setItem('nums',JSON.stringify(this.nums)) sessionStorage.setItem('nums',JSON.stringify(this.nums))
sessionStorage.setItem('submitTroubleNumber',this.submitTroubleNumber)
}).catch(()=>{ }).catch(()=>{
this.$toast.clear() this.$toast.clear()
this.$toast.fail('加载失败,请稍后再试') this.$toast.fail('加载失败,请稍后再试')
}) })
}, },
/* 结束上报接口请求 */ /* 结束上报接口请求 */
end(){ end(nums){
this.$dialog.confirm({ this.$dialog.confirm({
title: '提示', title: '提示',
message: '确定结束检查上报?', message: this.submitTroubleNumber?'您已提交'+this.submitTroubleNumber+'个问题'+'确定结束检查上报?':'您未提交问题,确定结束检查上报?',
}).then(()=>{ }).then(()=>{
postFun('check/carry/trouble/finish',{planId:this.id}).then((Response)=>{ postFun('check/carry/trouble/finish',{planId:this.id}).then((Response)=>{
this.$toast.clear() this.$toast.clear()
......
...@@ -185,7 +185,7 @@ export default { ...@@ -185,7 +185,7 @@ export default {
this.$router.push({ this.$router.push({
name:'note', name:'note',
query:{ query:{
pageName:'problemList' pageName:'problemList',
} }
}) })
}).catch(()=>{ }).catch(()=>{
......
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