2022-01-08 15:42:53 +00:00
|
|
|
<template>
|
|
|
|
|
<div id="app">
|
|
|
|
|
<router-view />
|
2022-12-04 22:13:46 +08:00
|
|
|
<theme-picker />
|
2022-01-08 15:42:53 +00:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-12-04 22:13:46 +08:00
|
|
|
import ThemePicker from "@/components/ThemePicker";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "App",
|
|
|
|
|
components: { ThemePicker },
|
2025-07-19 17:29:15 +08:00
|
|
|
created() {
|
|
|
|
|
// 应用启动时全局初始化分类数据
|
2025-07-24 10:08:09 +08:00
|
|
|
if (this.$store.getters.token) {
|
2025-11-15 14:11:12 +08:00
|
|
|
// this.$store.dispatch('category/getCategoryList');
|
2025-11-17 16:24:28 +08:00
|
|
|
// this.$store.dispatch('category/getProductMap');
|
|
|
|
|
// this.$store.dispatch('category/getRawMaterialMap');
|
2025-11-15 14:11:12 +08:00
|
|
|
// this.$store.dispatch('category/getBomMap');
|
|
|
|
|
// this.$store.dispatch('finance/getFinancialAccounts');
|
|
|
|
|
// this.$store.dispatch('craft/getProcessList');
|
2025-07-24 10:08:09 +08:00
|
|
|
}
|
2025-07-19 17:29:15 +08:00
|
|
|
},
|
2022-01-08 15:42:53 +00:00
|
|
|
metaInfo() {
|
|
|
|
|
return {
|
|
|
|
|
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
|
|
|
|
|
titleTemplate: title => {
|
|
|
|
|
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-12-04 22:13:46 +08:00
|
|
|
};
|
2022-01-08 15:42:53 +00:00
|
|
|
</script>
|
2022-12-04 22:13:46 +08:00
|
|
|
<style scoped>
|
|
|
|
|
#app .theme-picker {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|