Commit 4d7a7d37 authored by 13841799530's avatar 13841799530
Browse files

bug修改

解润东
20211028
parent 2ab4ce3c
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
            <div>检查开始时间:{{item.planStartTime}}</div>
            <div>检查结束时间:{{item.planEndTime}}</div>
            <div>检查地点:{{item.address}}</div>
            <div>是否提交:{{item.finish?'已提交':'未提交'}}</div>
        </div>
    </div>
</template>
@@ -43,7 +44,8 @@ export default {
        return {
            value:'',//列表搜索关键字值
            checkedList:[],//检查列表
            text:'检查执行'//顶部文本
            text:'检查执行',//顶部文本
            finish:'',//问题是否提交
        }
    },
    mounted() {
@@ -69,13 +71,13 @@ export default {
        },
        /* 搜索查询列表接口 */
        onSearch(){
            console.log(111)
            getFun('check/carry/user/list',{name:this.value}).then((Response)=>{
                this.checkedList=Response.data
            })
        },
        cardLocation(item){
            sessionStorage.setItem('id',item.id)
            sessionStorage.setItem('finish',item.finish)
            this.$router.push({name:'problem',params:{id:item.id}})//此id来判断是否加载问题上报新数据
        }
    }
+5 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
                            <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">
                                <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="1" @click="noGrage(item2)" >不合格</van-radio>
                                </van-radio-group>
@@ -62,12 +62,16 @@ export default {
            id:'',//检查执行清单id
            active:0,//tab默认选中状态
            text:'问题上报表',//顶部文本
            finish:'',//提交状态
        }
    },
    mounted() {
        if(this.$route.query.id){
            this.id=this.$route.query.id
        }
        if(sessionStorage.getItem('finish')){
            this.finish=sessionStorage.getItem('finish')
        }
        this.init()
    },
    methods: {
+17 −8
Original line number Diff line number Diff line
@@ -19,10 +19,10 @@
            <div>检查地点:{{nums.address}}</div>
        </div>
        <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="note">检查问题记录{{nums.addTroubleNumber}}</van-button>
            <van-button type="primary" round size="large" @click="end">结束上报</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" :disabled="finish=='true'?true:false">结束上报</van-button>
        </div>
    </div>
</template>
@@ -39,20 +39,28 @@ export default {
        return {
            id:'',//问题上报清单列表列表id
            nums:{},//问题上报清单列表
            text:'问题上报'//顶部文本
            text:'问题上报',//顶部文本
            finish:'',//提交状态
        }
    },
    mounted() {
        //请求新数据
        if(this.$route.params.id){
            this.id=sessionStorage.getItem('id')
            this.finish=sessionStorage.getItem('finish')
            this.init()
        }
        //缓存数据获取
        //缓存数据获取---不更新检查执行id时,获取缓存执行id
        else if(sessionStorage.getItem('id')){
            this.id=sessionStorage.getItem('id')
            this.finish=sessionStorage.getItem('finish')
            if(this.$route.query.pageName){
                this.init()
            }else{
                //当清单模板,问题列表,问题记录不进行提交操作返回该页面调用缓存数据
                this.nums=JSON.parse(sessionStorage.getItem('nums'))
            }
        }
    },
    methods: {
        /* 请求清单列表和模板数值接口 */
@@ -95,12 +103,13 @@ export default {
            this.$router.push({
                name:'note',
                query:{
                    id:this.nums.id
                    id:this.nums.id,
                    finish:this.finish
                }
            })
        },
        formwork(){
            this.$router.push({name:'formwork',query:{id:this.id}})
            this.$router.push({name:'formwork',query:{id:this.id,finish:this.finish}})
        }
    }
}
+6 −1
Original line number Diff line number Diff line
@@ -183,7 +183,12 @@ export default {
                        message:'提交成功',
                        duration: 2000
                    })
                    history.go(-1)
                    this.$router.push({
                        name:'problem',
                        query:{
                            pageName:'problemList'
                        }
                    })
                }).catch(()=>{
                    this.$toast.clear()
                    this.$toast.fail('提交失败,请稍后再试')
+14 −5
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
        <LHeader v-bind:text="text"></LHeader>
        <van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
            <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.address}}</div>
                <div>问题内容:{{item.context}}</div>
@@ -21,9 +21,9 @@
            </div>
        </van-checkbox-group>
        <div class="page-footer">
            <van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick">全选</van-checkbox>
            <van-button round type="defult" @click="cancel">取消</van-button>
            <van-button round type="info" @click="commit">提交</van-button>
            <van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox>
            <van-button round type="defult" @click="cancel" :disabled="finish=='true'?true:false">取消</van-button>
            <van-button round type="info" @click="commit" :disabled="finish=='true'?true:false">提交</van-button>
        </div>
    </div>
</template>
@@ -44,12 +44,16 @@ export default {
            result: [],//问题记录复选数组
            list:[],//列表数组
            id:'',//检查执行id
            finish:'',//提交状态
        }
    },
    mounted() {
        if(this.$route.query.id){
            this.id=this.$route.query.id
        }
        if(this.$route.query.finish){
            this.finish=this.$route.query.finish
        }
        this.init()
    },
    methods: {
@@ -130,7 +134,12 @@ export default {
                    duration: 0
                })
                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.success('提交成功')
                }).catch(()=>{
Loading