update 配方详情页面

This commit is contained in:
lb
2023-03-21 10:21:56 +08:00
parent f6066eaccf
commit 1904b5352c
6 changed files with 130 additions and 98 deletions

View File

@@ -1,30 +1,52 @@
<template>
<ListView :table-config="tableConfig" :dialog-configs="dialogConfigs" :listQueryExtra="['name']" />
<ListView
:table-config="tableConfig"
:dialog-configs="dialogConfigs"
:listQueryExtra="[{ key: name }]"
attach-list-query-extra="key"
:trigger-update="triggerUpdateKey"
/>
</template>
<script>
import initConfig from './config';
import ListView from '@/views/atomViews/ListView.vue';
import initConfig from "./config";
import ListView from "@/views/atomViews/ListView.vue";
export default {
name: 'BomDetailsView',
components: { ListView },
provide() {
return {
urls: this.allUrls
}
},
data() {
const { tableConfig, urls, dialogConfigs } = initConfig.call(this);
return {
tableConfig,
allUrls: urls,
dialogConfigs,
};
},
created() {},
mounted() {},
methods: {},
name: "BomDetailsView",
components: { ListView },
provide() {
return {
urls: this.allUrls,
};
},
computed: {
// 配方名称
name() {
return this.$route.query.name || "";
},
},
data() {
const { tableConfig, urls, dialogConfigs } = initConfig.call(this);
return {
tableConfig,
allUrls: urls,
dialogConfigs,
triggerUpdateKey: ''
};
},
watch: {
$route: {
handler: function (route) {
if (route.query.name) {
this.triggerUpdateKey = Math.random().toString();
console.log("[$oute changed] val.query.name", route.query.name, this.triggerUpdateKey);
}
},
immediate: true,
deep: true,
},
},
};
</script>