qa-prevention-gwj-vue/src/views/accident/records/index.vue

38 lines
637 B
Vue
Raw Normal View History

2024-08-30 18:22:13 +08:00
<template>
<div>
2024-09-06 18:17:09 +08:00
<List v-if="activeName === 'List'" ref="List" />
<Add v-if="activeName === 'AddOrEdit'" ref="AddOrEdit" />
<!-- <Detail v-if="activeName==='Detail'"/>-->
2024-08-30 18:22:13 +08:00
</div>
</template>
<script>
2024-09-06 16:19:59 +08:00
import List from './components/list.vue'
2024-09-06 18:17:09 +08:00
import Add from './components/addOrEdit.vue'
2024-08-30 18:22:13 +08:00
export default {
components: {
2024-09-06 18:17:09 +08:00
List: List,
Add: Add
2024-09-06 16:19:59 +08:00
// Detail: Detail
2024-08-30 18:22:13 +08:00
},
data() {
return {
activeName: 'List',
2024-09-08 22:08:29 +08:00
id: '',
tableName: ''
2024-08-30 18:22:13 +08:00
}
},
watch: {
activeName(val) {
if (val === 'List') {
2024-09-06 18:17:09 +08:00
this.$refs.List.getList()
2024-08-30 18:22:13 +08:00
}
}
}
}
</script>
<style scoped>
</style>