このコミットが含まれているのは:
lb 2023-01-12 15:56:30 +08:00
コミット 8876e015ae
3個のファイルの変更20998行の追加410行の削除

21180
package-lock.json generated

ファイル差分が大きすぎるため省略します 差分を読み込み

17
src/views/main-footer.vue ノーマルファイル
ファイルの表示

@ -0,0 +1,17 @@
<template>
<div class="footerbar">
© 中建材智能自动化研究院有限公司
<!-- © {{ 'copyright.company' | i18nFilter }} -->
</div>
</template>
<style lang="scss">
.footerbar{
width: 100%;
height: 20px;
text-align: center;
font-size: 12px;
color: #C7C7C7;
margin: 5px 0;
}
</style>

ファイルの表示

@ -1,102 +1,121 @@
<template>
<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]">
<template v-if="!loading">
<main-navbar />
<main-sidebar />
<div class="aui-content__wrapper">
<main-content v-if="!$store.state.contentIsNeedRefresh" />
</div>
</template>
</div>
<div
v-loading.fullscreen.lock="loading"
:element-loading-text="$t('loading')"
:class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]"
>
<template v-if="!loading">
<main-navbar />
<main-sidebar />
<div class="aui-content__wrapper">
<main-content v-if="!$store.state.contentIsNeedRefresh" />
<main-footer />
</div>
</template>
</div>
</template>
<script>
import MainNavbar from './main-navbar'
import MainSidebar from './main-sidebar'
import MainContent from './main-content'
import debounce from 'lodash/debounce'
import MainNavbar from "./main-navbar";
import MainSidebar from "./main-sidebar";
import MainContent from "./main-content";
import MainFooter from "./main-footer";
import debounce from "lodash/debounce";
export default {
provide () {
return {
//
refresh () {
this.$store.state.contentIsNeedRefresh = true
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false
})
}
}
},
data () {
return {
loading: true
}
},
components: {
MainNavbar,
MainSidebar,
MainContent
},
watch: {
$route: 'routeHandle'
},
created () {
this.windowResizeHandle()
this.routeHandle(this.$route)
Promise.all([
this.getUserInfo(),
this.getPermissions()
]).then(() => {
this.loading = false
})
},
methods: {
//
windowResizeHandle () {
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
window.addEventListener('resize', debounce(() => {
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
}, 150))
},
// ,
routeHandle (route) {
if (!route.meta.isTab) {
return false
}
var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0]
if (!tab) {
tab = {
...window.SITE_CONFIG['contentTabDefault'],
...route.meta,
'name': route.name,
'params': { ...route.params },
'query': { ...route.query }
}
this.$store.state.contentTabs = this.$store.state.contentTabs.concat(tab)
}
this.$store.state.sidebarMenuActiveName = tab.menuId
this.$store.state.contentTabsActiveName = tab.name
},
//
getUserInfo () {
return this.$http.get('/sys/user/info').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$store.state.user.id = res.data.id
this.$store.state.user.name = res.data.username
this.$store.state.user.superAdmin = res.data.superAdmin
}).catch(() => {})
},
//
getPermissions () {
return this.$http.get('/sys/menu/permissions').then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
window.SITE_CONFIG['permissions'] = res.data
}).catch(() => {})
}
}
}
provide() {
return {
//
refresh() {
this.$store.state.contentIsNeedRefresh = true;
this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false;
});
},
};
},
data() {
return {
loading: true,
};
},
components: {
MainNavbar,
MainSidebar,
MainFooter,
MainContent,
},
watch: {
$route: "routeHandle",
},
created() {
this.windowResizeHandle();
this.routeHandle(this.$route);
Promise.all([this.getUserInfo(), this.getPermissions()]).then(() => {
this.loading = false;
});
},
methods: {
//
windowResizeHandle() {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
window.addEventListener(
"resize",
debounce(() => {
this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false;
}, 150)
);
},
// ,
routeHandle(route) {
if (!route.meta.isTab) {
return false;
}
var tab = this.$store.state.contentTabs.filter(
(item) => item.name === route.name
)[0];
if (!tab) {
tab = {
...window.SITE_CONFIG["contentTabDefault"],
...route.meta,
name: route.name,
params: { ...route.params },
query: { ...route.query },
};
this.$store.state.contentTabs = this.$store.state.contentTabs.concat(
tab
);
}
this.$store.state.sidebarMenuActiveName = tab.menuId;
this.$store.state.contentTabsActiveName = tab.name;
},
//
getUserInfo() {
return this.$http
.get("/sys/user/info")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
this.$store.state.user.id = res.data.id;
this.$store.state.user.name = res.data.username;
this.$store.state.user.superAdmin = res.data.superAdmin;
})
.catch(() => {});
},
//
getPermissions() {
return this.$http
.get("/sys/menu/permissions")
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
}
window.SITE_CONFIG["permissions"] = res.data;
})
.catch(() => {});
},
},
};
</script>