pms-aomei/src/views/modules/pms/carHistory/index.vue
2023-03-22 16:35:18 +08:00

52 lines
1.0 KiB
Vue

<template>
<ListViewWithHead
:table-config="tableConfig"
:head-config="headFormConfigs"
:dialog-configs="dialogConfigs"
:listQueryExtra="[{ code }]"
attach-list-query-data="code"
:trigger-update="triggerUpdateKey"
/>
</template>
<script>
import initConfig from "./config";
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
export default {
name: "CarHistoryView",
components: { ListViewWithHead },
provide() {
return {
urls: this.allUrls,
};
},
computed: {
code() {
return this.$route.query.code || "";
},
},
data() {
const { tableConfig, headFormConfigs, urls, dialogConfigs } = initConfig.call(this);
return {
tableConfig,
headFormConfigs,
allUrls: urls,
dialogConfigs,
triggerUpdateKey: "",
};
},
watch: {
$route: {
handler: function (route) {
this.triggerUpdateKey = Math.random().toString();
},
immediate: true,
deep: true,
},
},
};
</script>
<style scoped></style>