import { mapActions, mapGetters } from 'vuex';
export default {
name: 'ViewDataList',
props: {
status: String,
},
computed: {
...mapGetters(['dataList', 'currentItem'])
},
methods: {
...mapActions(['loadData', 'setCurrentItem', 'moveBack', 'loadDataItemInfo', 'resetQuery']),
selectItem(event) {
const id = event.target.dataset.id;
this.setCurrentItem(id);
if (this.status == 'modal') {
this.loadDataItemInfo();
}
},
resetItem() {
this.resetQuery();
},
nextStep() {
this.$emit('nextStep');
}
},
created() {
this.loadData();
},
}