提交 42a597b4 authored 作者: lidongxu's avatar lidongxu

fix(app.vue): 修复:水印遮挡鼠标交互拖拽导致移动端页面无法滚动

上级 30458fc0
...@@ -52,11 +52,4 @@ onMounted(() => { ...@@ -52,11 +52,4 @@ onMounted(() => {
<style scoped <style scoped
lang="scss"> lang="scss">
.wm-class {
position: fixed !important;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style> </style>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
@import './sidebar.scss'; @import './sidebar.scss';
@import './btn.scss'; @import './btn.scss';
@import './ruoyi.scss'; @import './ruoyi.scss';
@import './vant.scss';
@import './font-size.scss'; @import './font-size.scss';
body { body {
......
.van-floating-bubble{
background: var(--main-color) !important;
}
\ No newline at end of file
...@@ -15,6 +15,7 @@ $menuText: #bfcbd9; ...@@ -15,6 +15,7 @@ $menuText: #bfcbd9;
$menuActiveText: #409eff; $menuActiveText: #409eff;
$menuBg: #304156; $menuBg: #304156;
$menuHover: #263445; $menuHover: #263445;
$mainColor: #f12528;
// 浅色主题theme-light // 浅色主题theme-light
$menuLightBg: #ffffff; $menuLightBg: #ffffff;
...@@ -73,6 +74,7 @@ $--color-info: #909399; ...@@ -73,6 +74,7 @@ $--color-info: #909399;
--sidebar-bg: #{$menuBg}; --sidebar-bg: #{$menuBg};
--sidebar-text: #{$menuText}; --sidebar-text: #{$menuText};
--menu-hover: #{$menuHover}; --menu-hover: #{$menuHover};
--main-color: #{$mainColor};
--navbar-bg: #ffffff; --navbar-bg: #ffffff;
--navbar-text: #303133; --navbar-text: #303133;
......
...@@ -24,28 +24,24 @@ import { isMobile } from '@/utils' ...@@ -24,28 +24,24 @@ import { isMobile } from '@/utils'
activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。
} }
*/ */
// 使用的路由 // 使用的公共静态路由
export let constantRoutes = [] export let constantRoutes = [{
export const publicRoutes = [ path: '/report/jmreport/view/:id',
{ component: () => import('@/views/jimureport/entry.vue'),
path: '/report/jmreport/view/:id', hidden: true
component: () => import('@/views/jimureport/entry.vue'), },
hidden: true {
}, path: '/report/jmreport/index/:id',
{ component: () => import('@/views/jimureport/entry.vue'),
path: '/report/jmreport/index/:id', hidden: true
component: () => import('@/views/jimureport/entry.vue'), },
hidden: true {
}, path: '/report/jmreport/shareView/:id',
{ component: () => import('@/views/jimureport/entry.vue'),
path: '/report/jmreport/shareView/:id', hidden: true
component: () => import('@/views/jimureport/entry.vue'), }]
hidden: true // PC端 静态路由
}
]
// PC端 公共路由
export const constantPCRoutes = [ export const constantPCRoutes = [
...publicRoutes,
{ {
path: '/redirect', path: '/redirect',
component: Layout, component: Layout,
...@@ -106,62 +102,6 @@ export const constantPCRoutes = [ ...@@ -106,62 +102,6 @@ export const constantPCRoutes = [
name: 'logistics' name: 'logistics'
} }
] ]
// 移动端 公共路由
export const constantMobileRoutes = [
...publicRoutes,
{
path: '/login',
component: () => import('@/views/login'),
hidden: true
},
{
path: '/',
redirect: '/m'
},
{
path: '/m',
redirect: '/m/menu',
component: () => import('@/views/mobile/index'),
hidden: true,
children: [
// 菜单页
{
path: 'menu',
component: () => import('@/views/mobile/views/menu'),
name: 'm_menu',
},
// 促销计划
{
path: 'promotion_plan', // 列表
component: () => import('@/views/mobile/views/promotion/plan/index'),
name: 'm_promotion_plan',
meta: { keepAlive: true } // 标记该路由需要缓存
},
{
path: 'promotion_plan_detail/:planId', // 详情
component: () => import('@/views/mobile/views/promotion/plan/detail'),
name: 'm_promotion_detail',
},
{
path: 'promotion_plan_editing/:planId?', // 增改
component: () => import('@/views/mobile/views/promotion/plan/editing'),
name: 'm_promotion_editing',
},
// 稽查
{
path: 'examine/:examineId',
component: () => import('@/views/mobile/views/examine'),
name: 'm_promotion_examine',
}
]
},
// 物流信息页面
{
path: '/logistics',
component: () => import('@/views/mobile/views/other/logistics'),
name: 'logistics'
}
]
// PC端 动态路由,基于用户权限动态去加载(一级的是靠网页里配置动态请求的,二级路由页面) // PC端 动态路由,基于用户权限动态去加载(一级的是靠网页里配置动态请求的,二级路由页面)
export const dynamicRoutes = [ export const dynamicRoutes = [
{ {
...@@ -235,6 +175,61 @@ export const dynamicRoutes = [ ...@@ -235,6 +175,61 @@ export const dynamicRoutes = [
] ]
} }
] ]
// 移动端 静态路由
export const constantMobileRoutes = [
{
path: '/login',
component: () => import('@/views/login'),
hidden: true
},
{
path: '/',
redirect: '/m'
},
{
path: '/m',
redirect: '/m/menu',
component: () => import('@/views/mobile/index'),
hidden: true,
children: [
// 菜单页
{
path: 'menu',
component: () => import('@/views/mobile/views/menu'),
name: 'm_menu',
},
// 促销计划
{
path: 'promotion_plan', // 列表
component: () => import('@/views/mobile/views/promotion/plan/index'),
name: 'm_promotion_plan',
meta: { keepAlive: true } // 标记该路由需要缓存
},
{
path: 'promotion_plan_detail/:planId', // 详情
component: () => import('@/views/mobile/views/promotion/plan/detail'),
name: 'm_promotion_detail',
},
{
path: 'promotion_plan_editing/:planId?', // 增改
component: () => import('@/views/mobile/views/promotion/plan/editing'),
name: 'm_promotion_editing',
},
// 稽查
{
path: 'examine/:examineId',
component: () => import('@/views/mobile/views/examine'),
name: 'm_promotion_examine',
}
]
},
// 物流信息页面
{
path: '/logistics',
component: () => import('@/views/mobile/views/other/logistics'),
name: 'logistics'
}
]
const router = createRouter({ const router = createRouter({
// 路由模式:createWebHashHistory,createWebHistory // 路由模式:createWebHashHistory,createWebHistory
......
...@@ -61,7 +61,6 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -61,7 +61,6 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
const userStore = useUserStore() const userStore = useUserStore()
const isAdmin = userStore.roles.includes('admin') // 管理员 const isAdmin = userStore.roles.includes('admin') // 管理员
return asyncRouterMap.filter(route => { return asyncRouterMap.filter(route => {
// 非管理员过滤掉需要管理员权限的路由 // 非管理员过滤掉需要管理员权限的路由
if (!isAdmin && route.name === 'Menu') { if (!isAdmin && route.name === 'Menu') {
......
...@@ -334,6 +334,13 @@ const addNewPlan = () => { ...@@ -334,6 +334,13 @@ const addNewPlan = () => {
background: #f5f5f5; background: #f5f5f5;
min-height: 100vh; min-height: 100vh;
/* 头部返回按钮 */
::v-deep(.van-nav-bar) {
.van-icon, .van-nav-bar__text {
color: var(--main-color);
}
}
.van-pull-refresh { .van-pull-refresh {
/* 并列选择身上的类名 */ /* 并列选择身上的类名 */
......
...@@ -122,7 +122,8 @@ ...@@ -122,7 +122,8 @@
<el-dialog :title="title" <el-dialog :title="title"
v-model="open" v-model="open"
append-to-body append-to-body
draggable overflow> draggable
overflow>
<el-form ref="menuRef" <el-form ref="menuRef"
:model="form" :model="form"
:rules="rules" :rules="rules"
...@@ -311,6 +312,27 @@ ...@@ -311,6 +312,27 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 设置第一层菜单属于哪个系统的(系统链路中心/勤策/...) -->
<el-col :span="12"
v-if="form.menuType == 'M'">
<el-form-item prop="belongSys">
<template #label>
<span>
<el-tooltip content="选择本菜单在哪个系统生效"
placement="top">
<el-icon><question-filled /></el-icon>
</el-tooltip>
所属系统
</span>
</template>
<el-select v-model="form.belongSys">
<el-option v-for="dict in menu_system"
:key="dict.value"
:label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" <el-col :span="12"
v-if="form.menuType != 'F'"> v-if="form.menuType != 'F'">
<el-form-item> <el-form-item>
...@@ -369,7 +391,7 @@ ...@@ -369,7 +391,7 @@
import IconSelect from "@/components/IconSelect"; import IconSelect from "@/components/IconSelect";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const { sys_show_hide, sys_normal_disable } = proxy.useDict("sys_show_hide", "sys_normal_disable"); const { sys_show_hide, sys_normal_disable, menu_system } = proxy.useDict("sys_show_hide", "sys_normal_disable", "menu_system");
const menuList = ref([]); const menuList = ref([]);
const open = ref(false); const open = ref(false);
...@@ -390,7 +412,8 @@ ...@@ -390,7 +412,8 @@
rules: { rules: {
menuName: [{ required: true, message: "菜单名称不能为空", trigger: "blur" }], menuName: [{ required: true, message: "菜单名称不能为空", trigger: "blur" }],
orderNum: [{ required: true, message: "菜单顺序不能为空", trigger: "blur" }], orderNum: [{ required: true, message: "菜单顺序不能为空", trigger: "blur" }],
path: [{ required: true, message: "路由地址不能为空", trigger: "blur" }] path: [{ required: true, message: "路由地址不能为空", trigger: "blur" }],
belongSys: [{ required: true, message: "所属系统不能为空", trigger: "blur" }]
}, },
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论