“dzb”
2022-10-03 4d9a35462803c7392dedca8d95fe21ff3d949466
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
    <div class="vio">
        <!-- 到达现场情况 -->
        <MyArrive ref="arrive"></MyArrive>
        <!-- 调查取证 -->
        <MyEvidence ref="evidence"></MyEvidence>
        <!-- 底部按钮 -->
        <div class="footer">
            <el-button @click="handleSubmit" type="primary">确定</el-button>
            <el-button>返回</el-button>
        </div>
    </div>
</template>
<script>
import MyArrive from '../components/arrive'
import MyEvidence from "../components/evidence"
export default {
    components:{
        MyArrive,MyEvidence
    },
    data() {
        return {
 
        }
    },
    methods:{
        handleSubmit(){
            const {arrive,evidence} = this.$refs;
            const {arriveForm} = arrive.$refs;
            const {evidenceForm} = evidence.$refs;
            console.log(evidenceForm);
            arriveForm.validate((valid)=>{
                console.log(valid);
                if(valid){
                    evidenceForm.validate((flag)=>{
                        if(flag){
                            console.log(flag);
                        }else{
                            return false;
                        }
                    })
                }else{
                    evidenceForm.validate((flag)=>{
                        if(!flag){
                            return false;
                        }
                    })
                    return false;
                }
            })
        }
    }
}
</script>
<style lang="scss" scoped>
    .vio{
        padding: 20px 200px;
    }
.footer {
        display: flex;
        justify-content: flex-end;
    }
</style>