Commit 4d7a7d37 authored by 13841799530's avatar 13841799530

bug修改

解润东
20211028
parent 2ab4ce3c
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
<div>检查开始时间:{{item.planStartTime}}</div> <div>检查开始时间:{{item.planStartTime}}</div>
<div>检查结束时间:{{item.planEndTime}}</div> <div>检查结束时间:{{item.planEndTime}}</div>
<div>检查地点:{{item.address}}</div> <div>检查地点:{{item.address}}</div>
<div>是否提交:{{item.finish?'已提交':'未提交'}}</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -43,7 +44,8 @@ export default { ...@@ -43,7 +44,8 @@ export default {
return { return {
value:'',//列表搜索关键字值 value:'',//列表搜索关键字值
checkedList:[],//检查列表 checkedList:[],//检查列表
text:'检查执行'//顶部文本 text:'检查执行',//顶部文本
finish:'',//问题是否提交
} }
}, },
mounted() { mounted() {
...@@ -69,13 +71,13 @@ export default { ...@@ -69,13 +71,13 @@ export default {
}, },
/* 搜索查询列表接口 */ /* 搜索查询列表接口 */
onSearch(){ onSearch(){
console.log(111)
getFun('check/carry/user/list',{name:this.value}).then((Response)=>{ getFun('check/carry/user/list',{name:this.value}).then((Response)=>{
this.checkedList=Response.data this.checkedList=Response.data
}) })
}, },
cardLocation(item){ cardLocation(item){
sessionStorage.setItem('id',item.id) sessionStorage.setItem('id',item.id)
sessionStorage.setItem('finish',item.finish)
this.$router.push({name:'problem',params:{id:item.id}})//此id来判断是否加载问题上报新数据 this.$router.push({name:'problem',params:{id:item.id}})//此id来判断是否加载问题上报新数据
} }
} }
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<td align="center" v-text="item2.checkContent" style="width:20%"></td> <td align="center" v-text="item2.checkContent" style="width:20%"></td>
<td align="center" v-text="item2.checkBasis" style="width:30%"></td> <td align="center" v-text="item2.checkBasis" style="width:30%"></td>
<td align="center"> <td align="center">
<van-radio-group v-model="item2.checkStatus" :disabled="item2.isDisabled"> <van-radio-group v-model="item2.checkStatus" :disabled="finish=='true'?true:item2.isDisabled">
<van-radio name="0" >合格</van-radio> <van-radio name="0" >合格</van-radio>
<van-radio name="1" @click="noGrage(item2)" >不合格</van-radio> <van-radio name="1" @click="noGrage(item2)" >不合格</van-radio>
</van-radio-group> </van-radio-group>
...@@ -62,12 +62,16 @@ export default { ...@@ -62,12 +62,16 @@ export default {
id:'',//检查执行清单id id:'',//检查执行清单id
active:0,//tab默认选中状态 active:0,//tab默认选中状态
text:'问题上报表',//顶部文本 text:'问题上报表',//顶部文本
finish:'',//提交状态
} }
}, },
mounted() { mounted() {
if(this.$route.query.id){ if(this.$route.query.id){
this.id=this.$route.query.id this.id=this.$route.query.id
} }
if(sessionStorage.getItem('finish')){
this.finish=sessionStorage.getItem('finish')
}
this.init() this.init()
}, },
methods: { methods: {
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<div>检查地点:{{nums.address}}</div> <div>检查地点:{{nums.address}}</div>
</div> </div>
<div class="button-more"> <div class="button-more">
<van-button type="primary" round size="large" @click="problem">检查问题上报{{nums.troubleNumber}}</van-button> <van-button type="primary" round size="large" @click="problem" :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">检查问题记录{{nums.addTroubleNumber}}</van-button> <van-button type="primary" round size="large" @click="note" :disabled="nums.addTroubleNumber<1?true:false">检查问题记录{{nums.troubleNumber}}</van-button>
<van-button type="primary" round size="large" @click="end">结束上报</van-button> <van-button type="primary" round size="large" @click="end" :disabled="finish=='true'?true:false">结束上报</van-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -39,19 +39,27 @@ export default { ...@@ -39,19 +39,27 @@ export default {
return { return {
id:'',//问题上报清单列表列表id id:'',//问题上报清单列表列表id
nums:{},//问题上报清单列表 nums:{},//问题上报清单列表
text:'问题上报'//顶部文本 text:'问题上报',//顶部文本
finish:'',//提交状态
} }
}, },
mounted() { mounted() {
//请求新数据 //请求新数据
if(this.$route.params.id){ if(this.$route.params.id){
this.id=sessionStorage.getItem('id') this.id=sessionStorage.getItem('id')
this.finish=sessionStorage.getItem('finish')
this.init() this.init()
} }
//缓存数据获取 //缓存数据获取---不更新检查执行id时,获取缓存执行id
else if(sessionStorage.getItem('id')){ else if(sessionStorage.getItem('id')){
this.id=sessionStorage.getItem('id') this.id=sessionStorage.getItem('id')
this.nums=JSON.parse(sessionStorage.getItem('nums')) this.finish=sessionStorage.getItem('finish')
if(this.$route.query.pageName){
this.init()
}else{
//当清单模板,问题列表,问题记录不进行提交操作返回该页面调用缓存数据
this.nums=JSON.parse(sessionStorage.getItem('nums'))
}
} }
}, },
methods: { methods: {
...@@ -95,12 +103,13 @@ export default { ...@@ -95,12 +103,13 @@ export default {
this.$router.push({ this.$router.push({
name:'note', name:'note',
query:{ query:{
id:this.nums.id id:this.nums.id,
finish:this.finish
} }
}) })
}, },
formwork(){ formwork(){
this.$router.push({name:'formwork',query:{id:this.id}}) this.$router.push({name:'formwork',query:{id:this.id,finish:this.finish}})
} }
} }
} }
......
...@@ -183,7 +183,12 @@ export default { ...@@ -183,7 +183,12 @@ export default {
message:'提交成功', message:'提交成功',
duration: 2000 duration: 2000
}) })
history.go(-1) this.$router.push({
name:'problem',
query:{
pageName:'problemList'
}
})
}).catch(()=>{ }).catch(()=>{
this.$toast.clear() this.$toast.clear()
this.$toast.fail('提交失败,请稍后再试') this.$toast.fail('提交失败,请稍后再试')
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup"> <van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
<div class="card" v-for="(item,index) in list" :key="index" > <div class="card" v-for="(item,index) in list" :key="index" >
<van-checkbox :name="item.id" :disabled="item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox> <van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox>
<div>问题名称:{{item.title}}</div> <div>问题名称:{{item.title}}</div>
<div>问题位置:{{item.address}}</div> <div>问题位置:{{item.address}}</div>
<div>问题内容:{{item.context}}</div> <div>问题内容:{{item.context}}</div>
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
</div> </div>
</van-checkbox-group> </van-checkbox-group>
<div class="page-footer"> <div class="page-footer">
<van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick">全选</van-checkbox> <van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox>
<van-button round type="defult" @click="cancel">取消</van-button> <van-button round type="defult" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button>
<van-button round type="info" @click="commit">提交</van-button> <van-button round type="info" @click="commit" :disabled="finish=='true'?true:false">提交</van-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -44,12 +44,16 @@ export default { ...@@ -44,12 +44,16 @@ export default {
result: [],//问题记录复选数组 result: [],//问题记录复选数组
list:[],//列表数组 list:[],//列表数组
id:'',//检查执行id id:'',//检查执行id
finish:'',//提交状态
} }
}, },
mounted() { mounted() {
if(this.$route.query.id){ if(this.$route.query.id){
this.id=this.$route.query.id this.id=this.$route.query.id
} }
if(this.$route.query.finish){
this.finish=this.$route.query.finish
}
this.init() this.init()
}, },
methods: { methods: {
...@@ -130,7 +134,12 @@ export default { ...@@ -130,7 +134,12 @@ export default {
duration: 0 duration: 0
}) })
postFun('check/carry/trouble/submit',obj).then((Response)=>{ postFun('check/carry/trouble/submit',obj).then((Response)=>{
this.$router.push('/correct') this.$router.push({
name:'problem',
query:{
pageName:'problemNote'
}
})
this.$toast.clear() this.$toast.clear()
this.$toast.success('提交成功') this.$toast.success('提交成功')
}).catch(()=>{ }).catch(()=>{
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
data() { data() {
return { return {
noticeList:[],//整改通知管理列表 noticeList:[],//整改通知管理列表
text:'整改通知管理' text:'整改通知管理',
} }
}, },
mounted() { mounted() {
...@@ -57,6 +57,7 @@ export default { ...@@ -57,6 +57,7 @@ export default {
}) })
}, },
cardLocation(item){ cardLocation(item){
sessionStorage.setItem('finish',item.finish)
this.$router.push({ this.$router.push({
name:'noticeList', name:'noticeList',
query:{ query:{
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<template> <template>
<div> <div>
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<van-tabs v-model="active"> <van-tabs v-model="active" @click="tabClick">
<van-tab title="上报状态"> <van-tab title="上报状态">
<table border="1" cellspacing="0"> <table border="1" cellspacing="0">
<thead> <thead>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<van-tab title="问题记录"> <van-tab title="问题记录">
<van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup"> <van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
<div class="card" v-for="(item,index) in noticeQuestionList" :key="index" > <div class="card" v-for="(item,index) in noticeQuestionList" :key="index" >
<van-checkbox :name="item.id" :disabled="item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox> <van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox>
<div>负责人姓名:{{item.realName}}</div> <div>负责人姓名:{{item.realName}}</div>
<div>问题名称:{{item.title}}</div> <div>问题名称:{{item.title}}</div>
<div>问题位置:{{item.address}}</div> <div>问题位置:{{item.address}}</div>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
</van-checkbox-group> </van-checkbox-group>
<div class="page-footer"> <div class="page-footer">
<van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick">全选</van-checkbox> <van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox>
</div> </div>
<van-field <van-field
readonly readonly
...@@ -54,13 +54,13 @@ ...@@ -54,13 +54,13 @@
:value="value" :value="value"
label="整改完成日期" label="整改完成日期"
placeholder="请选择日期" placeholder="请选择日期"
@click="showCalendar = true" @click="calendarOpen"
/> />
<van-calendar v-model="showCalendar" @confirm="onConfirm" /> <van-calendar v-model="showCalendar" @confirm="onConfirm" />
<div class="sign"><span>检查组负责人签字确认:</span><van-tag color="#ffe1e1">电子签字</van-tag></div> <div class="sign"><span>检查组负责人签字确认:</span><van-tag color="#ffe1e1" :disabled="finish=='true'?true:false">电子签字</van-tag></div>
<div class="page-footer-button"> <div class="page-footer-button">
<van-button round type="info" size="large" @click="commit">生成整改通知单</van-button> <van-button round type="info" size="large" @click="commit" :disabled="finish=='true'?true:false">生成整改通知单</van-button>
<van-button round type="defult" size="large" @click="cancel">取消</van-button> <van-button round type="defult" size="large" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
...@@ -86,12 +86,19 @@ export default { ...@@ -86,12 +86,19 @@ export default {
value: '',//日期值 value: '',//日期值
id:'',//整改通知id id:'',//整改通知id
showCalendar: false,//弹出层状态 showCalendar: false,//弹出层状态
finish:'',//检查状态
} }
},
watch:{
}, },
mounted() { mounted() {
if(this.$route.query.id){ if(this.$route.query.id){
this.id=this.$route.query.id this.id=this.$route.query.id
} }
if(sessionStorage.getItem('finish')){
this.finish=sessionStorage.getItem('finish')
}
this.init() this.init()
// this.$toast.clear() // this.$toast.clear()
}, },
...@@ -119,7 +126,6 @@ export default { ...@@ -119,7 +126,6 @@ export default {
problem(){ problem(){
this.noticeQuestionList=[] this.noticeQuestionList=[]
getFun('check/notify/trouble/list',{planId:this.id}).then((Response)=>{ getFun('check/notify/trouble/list',{planId:this.id}).then((Response)=>{
this.noticeQuestionList=Response.data
this.noticeQuestionList=Response.data this.noticeQuestionList=Response.data
this.noticeQuestionList.forEach((item)=>{ this.noticeQuestionList.forEach((item)=>{
if(item.checkSubmitId){ if(item.checkSubmitId){
...@@ -163,6 +169,22 @@ export default { ...@@ -163,6 +169,22 @@ export default {
cancel(){ cancel(){
this.$toast('取消') this.$toast('取消')
}, },
//日期输入框点击事件
calendarOpen(){
if(this.finish=='false'){
this.showCalendar = true
}
},
//标签点击事件防止标签切换首次进入不执行复选框监听事件
tabClick(idx){
if(idx==1){
if(this.result.length==this.noticeQuestionList.length){
this.checkedAll=true
}else if(this.result.length<this.noticeQuestionList.length){
this.checkedAll=false
}
}
},
//提交问题记录 //提交问题记录
commit(){ commit(){
var checkedList=[] var checkedList=[]
......
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