<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>
|