新增欢迎首页
BIN
src/assets/index_bg.png
Normal file
|
After Width: | Height: | Size: 1.3 MiB |
BIN
src/assets/index_quick1.png
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
BIN
src/assets/index_quick2.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
BIN
src/assets/index_quick3.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/assets/index_quick4.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
src/assets/index_quick5.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
src/assets/index_quick6.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
@@ -24,61 +24,17 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: "/",
|
path: '/',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: "/index",
|
redirect: '/index',
|
||||||
meta: {
|
|
||||||
title: "数据中心",
|
|
||||||
icon: "数据统计",
|
|
||||||
alwaysShow: true,
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "index",
|
path: 'index',
|
||||||
component: () => import("@/views/data/index.vue"),
|
component: () => import('@/views/index/index.vue'),
|
||||||
name: "",
|
name: 'index',
|
||||||
meta: {
|
meta: {
|
||||||
title: "经营数据",
|
title: '首页',
|
||||||
affix: false,
|
icon: 'homepage',
|
||||||
keepAlive: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "sales",
|
|
||||||
name: "",
|
|
||||||
component: () => import("@/views/data/sales.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "销售统计",
|
|
||||||
affix: false,
|
|
||||||
keepAlive: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "table",
|
|
||||||
name: "",
|
|
||||||
component: () => import("@/views/data/table.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "台桌统计",
|
|
||||||
affix: false,
|
|
||||||
keepAlive: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "finance",
|
|
||||||
name: "",
|
|
||||||
component: () => import("@/views/data/finance.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "财务报表"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "work",
|
|
||||||
name: "workStatistics",
|
|
||||||
component: () => import("@/views/data/work.vue"),
|
|
||||||
meta: {
|
|
||||||
title: "收银交班记录",
|
|
||||||
affix: false,
|
|
||||||
keepAlive: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -91,9 +47,79 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
component: () => import("@/views/error/404.vue"),
|
component: () => import("@/views/error/404.vue"),
|
||||||
meta: { hidden: true },
|
meta: { hidden: true },
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
// path: "/",
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: "/index",
|
||||||
|
// meta: {
|
||||||
|
// title: "数据中心",
|
||||||
|
// icon: "数据统计",
|
||||||
|
// alwaysShow: true,
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: "index",
|
||||||
|
// component: () => import("@/views/data/index.vue"),
|
||||||
|
// name: "",
|
||||||
|
// meta: {
|
||||||
|
// title: "经营数据",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "sales",
|
||||||
|
// name: "",
|
||||||
|
// component: () => import("@/views/data/sales.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "销售统计",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "table",
|
||||||
|
// name: "",
|
||||||
|
// component: () => import("@/views/data/table.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "台桌统计",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "finance",
|
||||||
|
// name: "",
|
||||||
|
// component: () => import("@/views/data/finance.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "财务报表"
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "work",
|
||||||
|
// name: "workStatistics",
|
||||||
|
// component: () => import("@/views/data/work.vue"),
|
||||||
|
// meta: {
|
||||||
|
// title: "收银交班记录",
|
||||||
|
// affix: false,
|
||||||
|
// keepAlive: true,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "401",
|
||||||
|
// component: () => import("@/views/error/401.vue"),
|
||||||
|
// meta: { hidden: true },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: "404",
|
||||||
|
// component: () => import("@/views/error/404.vue"),
|
||||||
|
// meta: { hidden: true },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// },
|
||||||
|
// {
|
||||||
// path: "/shop",
|
// path: "/shop",
|
||||||
// component: Layout,
|
// component: Layout,
|
||||||
// meta: {
|
// meta: {
|
||||||
|
|||||||
@@ -1,5 +1,111 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="gyq_container">
|
||||||
<h1>Index</h1>
|
<div class="item_wrap">
|
||||||
|
<div class="title">您好,欢迎登录</div>
|
||||||
|
<div class="item_list">
|
||||||
|
<div class="item" v-for="(item, index) in quickStore.quickMenus" :key="item.id" @click="menuClick(item.menuId)">
|
||||||
|
<img class="icon" :src="icons[index + 1]" alt="">
|
||||||
|
{{ returnMenuName(item.menuId) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { onMounted, nextTick } from "vue";
|
||||||
|
import { useQuickStore, usePermissionStore, useUserStore } from "@/store";
|
||||||
|
|
||||||
|
import icon1 from "@/assets/index_quick1.png";
|
||||||
|
import icon2 from "@/assets/index_quick2.png";
|
||||||
|
import icon3 from "@/assets/index_quick3.png";
|
||||||
|
import icon4 from "@/assets/index_quick4.png";
|
||||||
|
import icon5 from "@/assets/index_quick5.png";
|
||||||
|
import icon6 from "@/assets/index_quick6.png";
|
||||||
|
|
||||||
|
const icons = {
|
||||||
|
1: icon1,
|
||||||
|
2: icon2,
|
||||||
|
3: icon3,
|
||||||
|
4: icon4,
|
||||||
|
5: icon5,
|
||||||
|
6: icon6,
|
||||||
|
};
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const quickStore = useQuickStore();
|
||||||
|
const permissionStore = usePermissionStore();
|
||||||
|
|
||||||
|
function returnMenuName(menuId) {
|
||||||
|
return permissionStore.returnMenuName(menuId);
|
||||||
|
}
|
||||||
|
|
||||||
|
function menuClick(menuId) {
|
||||||
|
permissionStore.menuJump(menuId);
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await nextTick();
|
||||||
|
console.log('quickStore.quickMenus', quickStore.quickMenus);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.gyq_container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: url('@/assets/index_bg.png') no-repeat center center / cover;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding-bottom: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_wrap {
|
||||||
|
padding-left: 300px;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 40px;
|
||||||
|
margin-bottom: 50px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item_list {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
grid-template-rows: repeat(2, 1fr);
|
||||||
|
grid-column-gap: 90px;
|
||||||
|
grid-row-gap: 90px;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 152px;
|
||||||
|
height: 83px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: linear-gradient(115deg, #9EC4FF 5.9%, #6668E8 111.62%);
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #fff;
|
||||||
|
padding-left: 30px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
transform: translateY(-10px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
position: absolute;
|
||||||
|
left: -30px;
|
||||||
|
top: -20px;
|
||||||
|
width: 83px;
|
||||||
|
height: 78px;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -74,12 +74,19 @@ const accountList = reactive([
|
|||||||
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
||||||
// { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
// { username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
||||||
{ username: "18821670757", type: 'success', label: '高歌的小店' },
|
{ username: "18821670757", type: 'success', label: '高歌的小店' },
|
||||||
|
{ username: "18821670757", staffUserName: '18821670758', type: 'primary', label: '高歌的小店的员工-张三' },
|
||||||
{ username: "191123456", type: 'primary', label: '酸橘子' },
|
{ username: "191123456", type: 'primary', label: '酸橘子' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 快捷模拟登录
|
// 快捷模拟登录
|
||||||
function accountHandle(item) {
|
function accountHandle(item) {
|
||||||
state.loginForm.username = item.username;
|
state.loginForm.username = item.username;
|
||||||
|
if (item.staffUserName) {
|
||||||
|
state.loginForm.loginType = 1
|
||||||
|
state.loginForm.staffUserName = item.staffUserName
|
||||||
|
} else {
|
||||||
|
state.loginForm.loginType = 0
|
||||||
|
}
|
||||||
state.loginForm.code = 666666
|
state.loginForm.code = 666666
|
||||||
const d = new Date();
|
const d = new Date();
|
||||||
state.loginForm.password = `czg${d.getHours().toString().padStart(2, '0')}${d.getMinutes().toString().padStart(2, '0')}`;
|
state.loginForm.password = `czg${d.getHours().toString().padStart(2, '0')}${d.getMinutes().toString().padStart(2, '0')}`;
|
||||||
|
|||||||