大屏项目初始化
This commit is contained in:
12
screen-vue/src/api/bizMenu.js
Normal file
12
screen-vue/src/api/bizMenu.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取指标信息列表
|
||||
*/
|
||||
export function getHomeMenuList(params) {
|
||||
return request({
|
||||
url: '/biz/homeMenu/list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
12
screen-vue/src/api/bizUser.js
Normal file
12
screen-vue/src/api/bizUser.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 获取指标信息列表
|
||||
*/
|
||||
export function getHomeUserList(params) {
|
||||
return request({
|
||||
url: '/biz/homeUser/list',
|
||||
method: 'get',
|
||||
params: params
|
||||
})
|
||||
}
|
||||
BIN
screen-vue/src/assets/logo.png
Normal file
BIN
screen-vue/src/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
142
screen-vue/src/components/Layout/editPswd.vue
Normal file
142
screen-vue/src/components/Layout/editPswd.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div class="edit-pwd-container">
|
||||
<el-form ref="pwdFormRef" :model="pwdForm" :rules="pwdRules" label-width="80px" class="pwd-form">
|
||||
<el-form-item label="原密码" prop="oldPassword">
|
||||
<el-input v-model="pwdForm.oldPassword" type="password" placeholder="请输入原密码" show-password size="default" maxlength="20"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword">
|
||||
<el-input v-model="pwdForm.newPassword" type="password" placeholder="请输入新密码" show-password size="default" maxlength="20"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="confirmPassword">
|
||||
<el-input v-model="pwdForm.confirmPassword" type="password" placeholder="请确认新密码" show-password size="default" maxlength="20"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
|
||||
const emit = defineEmits(['success'])
|
||||
|
||||
const pwdFormRef = ref(null)
|
||||
|
||||
|
||||
const pwdForm = reactive({
|
||||
oldPassword: '',
|
||||
newPassword: '',
|
||||
confirmPassword: ''
|
||||
})
|
||||
|
||||
// 表单验证规则
|
||||
const pwdRules = reactive({
|
||||
oldPassword: [{ required: true, message: '请输入原密码', trigger: 'blur' }],
|
||||
newPassword: [
|
||||
{ required: true, message: '请输入新密码', trigger: 'blur' },
|
||||
{ min: 8, max: 20, message: '密码长度必须在8-20位之间', trigger: 'blur' },
|
||||
{ pattern: /^(?=.*[a-zA-Z])(?=.*\d).+$/, message: '密码必须包含字母和数字', trigger: 'blur' }
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, message: '请确认新密码', trigger: 'blur' },
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
if (value === '') {
|
||||
callback(new Error('请确认新密码'))
|
||||
} else if (value !== pwdForm.newPassword) {
|
||||
callback(new Error('两次输入的密码不一致'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
// 提交表单
|
||||
const submitForm = async () => {
|
||||
if (!pwdFormRef.value) return
|
||||
try {
|
||||
// 表单验证
|
||||
const valid = await pwdFormRef.value.validate()
|
||||
if (!valid) return
|
||||
await ElMessageBox.confirm(
|
||||
'确认要修改密码吗?',
|
||||
'温馨提示',
|
||||
{ confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }
|
||||
)
|
||||
await new Promise(resolve => setTimeout(resolve, 800))
|
||||
emit('success')
|
||||
} catch (error) {
|
||||
if (error !== 'cancel' && !(error instanceof Error && error.message.includes('cancel'))) {
|
||||
ElMessage.error(error.message || '密码修改失败,请稍后重试')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 重置表单
|
||||
const resetForm = () => {
|
||||
if (pwdFormRef.value) {
|
||||
pwdFormRef.value.resetFields()
|
||||
pwdForm.oldPassword = ''
|
||||
pwdForm.newPassword = ''
|
||||
pwdForm.confirmPassword = ''
|
||||
}
|
||||
}
|
||||
defineExpose({ submitForm, resetForm })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.edit-pwd-container {
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
padding: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.pwd-form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item:last-child) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
:deep(.el-input) {
|
||||
--el-input-height: 32px !important;
|
||||
width: 100%;
|
||||
--el-input-border-radius: 4px;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
font-size: 13px;
|
||||
color: #303133;
|
||||
font-weight: 500;
|
||||
}
|
||||
:deep(.el-input__wrapper) {
|
||||
padding: 0 10px;
|
||||
height: 32px !important;
|
||||
}
|
||||
|
||||
:deep(.el-input__inner) {
|
||||
height: 32px !important;
|
||||
line-height: 32px !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
:deep(.el-input__suffix-inner) {
|
||||
height: 32px !important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.el-icon) {
|
||||
font-size: 14px !important;
|
||||
}
|
||||
</style>
|
||||
767
screen-vue/src/components/Layout/index.vue
Normal file
767
screen-vue/src/components/Layout/index.vue
Normal file
@@ -0,0 +1,767 @@
|
||||
<template>
|
||||
<el-container class="app-container" style="height: 100vh; overflow: hidden;">
|
||||
<el-header class="app-header">
|
||||
<div class="header-left">
|
||||
<img :src="LogoImg" class="app-logo" />
|
||||
<div class="logo">{{ systemTitle }}</div>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<el-tooltip content="全屏模式" placement="bottom">
|
||||
<el-button text @click="handleFullScreen" class="header-icon-btn">
|
||||
<el-icon size="18"><FullScreen /></el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="大屏展示" placement="bottom">
|
||||
<el-button text @click="handleBigScreen" class="header-icon-btn">
|
||||
<el-icon size="18"><Monitor /></el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-dropdown trigger="click" @command="handleCommand">
|
||||
<div class="user-info">
|
||||
<el-avatar bg-color="#409eff"><el-icon><User /></el-icon></el-avatar>
|
||||
<span class="user-name">{{ LoginUser?.uname }}</span>
|
||||
<el-icon><ArrowDown /></el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="modifyPwd">
|
||||
<el-icon><Lock /></el-icon>
|
||||
<span>修改密码</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="logout">
|
||||
<el-icon><SwitchButton /></el-icon>
|
||||
<span>退出系统</span>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</el-header>
|
||||
|
||||
<el-container>
|
||||
<el-aside :width="isCollapse ? '64px' : '200px'" class="app-aside">
|
||||
<div class="aside-wrapper">
|
||||
<div class="menu-scroll-container" :style="{ overflowY: isCollapse ? 'hidden' : 'auto' }">
|
||||
<el-menu
|
||||
:default-active="activeTabKey"
|
||||
:collapse="isCollapse"
|
||||
background-color="#1f2d3d"
|
||||
text-color="#e5e9f2"
|
||||
active-text-color="#409eff"
|
||||
:collapse-transition="false"
|
||||
class="app-menu"
|
||||
>
|
||||
<template v-for="menu in menuList" :key="menu.menuId">
|
||||
<el-sub-menu v-if="menu.menuType === 'M' && menu.children && menu.children.length > 0" :index="menu.menuId">
|
||||
<template #title>
|
||||
<el-icon><component :is="menu.menuIcon || 'Menu'" /></el-icon>
|
||||
<span>{{ menu.menuName }}</span>
|
||||
</template>
|
||||
<template #default>
|
||||
<template v-for="child in menu.children" :key="child.menuId">
|
||||
<el-menu-item :index="child.menuId" @click="handleMenuClick(child)">
|
||||
<el-icon><component :is="child.menuIcon || 'Menu'" /></el-icon>
|
||||
<template #title>{{ child.menuName }}</template>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</template>
|
||||
</el-sub-menu>
|
||||
<el-menu-item v-else-if="menu.menuType === 'C'" :index="menu.menuId" @click="handleMenuClick(menu)">
|
||||
<el-icon><component :is="menu.menuIcon || 'Menu'" /></el-icon>
|
||||
<template #title>{{ menu.menuName }}</template>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</el-menu>
|
||||
</div>
|
||||
<div class="aside-footer">
|
||||
<el-button
|
||||
circle
|
||||
@click="toggleSidebar"
|
||||
class="fold-btn"
|
||||
:class="{ 'fold-btn-active': isFoldBtnActive }"
|
||||
@mousedown="() => isFoldBtnActive = true"
|
||||
@mouseup="() => isFoldBtnActive = false"
|
||||
@mouseleave="() => isFoldBtnActive = false"
|
||||
>
|
||||
<el-icon size="16">
|
||||
<component :is="isCollapse ? 'Expand' : 'Fold'" />
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-aside>
|
||||
|
||||
<el-container class="main-container">
|
||||
<div class="tabs-container">
|
||||
<div class="tabs-wrapper">
|
||||
<div
|
||||
class="tab-item"
|
||||
:class="{ 'tab-active': activeTabKey === 'dashboard' }"
|
||||
@click="switchToHome"
|
||||
>
|
||||
<el-icon class="tab-icon"><House /></el-icon>
|
||||
<span class="tab-text">首页</span>
|
||||
</div>
|
||||
<el-button text class="scroll-btn" @click="scrollTab('left')" :disabled="tabs.length === 0">
|
||||
<el-icon size="14"><ArrowLeft /></el-icon>
|
||||
</el-button>
|
||||
<div class="tabs-scroll-box" ref="tabsScrollRef">
|
||||
<div class="dynamic-tabs">
|
||||
<div
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
class="tab-item"
|
||||
:class="{ 'tab-active': activeTabKey === tab.key }"
|
||||
@click="switchTab(tab)"
|
||||
>
|
||||
<span class="tab-text">{{ tab.name }}</span>
|
||||
<el-icon class="tab-close-icon" @click.stop="closeTab(tab.key)">
|
||||
<Close />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-button text class="scroll-btn" @click="scrollTab('right')" :disabled="tabs.length === 0">
|
||||
<el-icon size="14"><ArrowRight /></el-icon>
|
||||
</el-button>
|
||||
<el-button text class="close-all-btn" @click="closeAllTabs" :disabled="tabs.length === 0">
|
||||
<el-icon size="14"><Close /></el-icon>
|
||||
关闭全部
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-main class="content-container">
|
||||
<div class="content-wrapper">
|
||||
<router-view />
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
|
||||
<el-dialog
|
||||
v-model="showEditPwdDialog"
|
||||
title="修改密码"
|
||||
width="30%"
|
||||
:close-on-click-modal="false"
|
||||
@close="handleEditPwdDialogClose"
|
||||
:before-close="handleDialogBeforeClose"
|
||||
class="custom-pwd-dialog"
|
||||
>
|
||||
<EditPswd ref="editPwdRef" @success="handlePwdModifySuccess" />
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button size="default" @click="showEditPwdDialog = false">取消</el-button>
|
||||
<el-button size="default" type="primary" @click="submitEditPwd">确定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {
|
||||
ArrowDown, Lock, SwitchButton, User, FullScreen, Monitor,
|
||||
Expand, Fold, Close, ArrowLeft, ArrowRight, Menu, House
|
||||
} from '@element-plus/icons-vue'
|
||||
import { getHomeMenuList } from '@/api/bizMenu'
|
||||
import LogoImg from '@/assets/logo.png'
|
||||
import EditPswd from './editPswd.vue'
|
||||
|
||||
const systemTitle = ref("myPro管理系统")
|
||||
|
||||
const LoginUser = ref(JSON.parse(localStorage.getItem("loginUser")));
|
||||
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const menuList = ref([])
|
||||
const isCollapse = ref(false)
|
||||
const tabsScrollRef = ref(null)
|
||||
const tabs = ref([])
|
||||
const activeTabKey = ref('dashboard')
|
||||
const isFoldBtnActive = ref(false)
|
||||
const menuNameMap = ref({})
|
||||
const showEditPwdDialog = ref(false)
|
||||
const editPwdRef = ref(null)
|
||||
|
||||
const getMenuList = async () => {
|
||||
try {
|
||||
const res = await getHomeMenuList();
|
||||
menuList.value = res || [];
|
||||
const setMenuNameMap = (menus) => {
|
||||
menus.forEach(menu => {
|
||||
if (menu.menuId) menuNameMap.value[menu.menuId] = menu.menuName;
|
||||
if (menu.children && menu.children.length > 0) setMenuNameMap(menu.children);
|
||||
});
|
||||
}
|
||||
setMenuNameMap(menuList.value);
|
||||
} catch (error) {
|
||||
ElMessage.error('获取菜单失败:' + (error.message || error));
|
||||
}
|
||||
}
|
||||
|
||||
const handleMenuClick = (menu) => {
|
||||
const key = menu.menuId;
|
||||
const name = menu.menuName;
|
||||
if (!tabs.value.some(tab => tab.key === key)) {
|
||||
tabs.value.push({ key, name });
|
||||
}
|
||||
activeTabKey.value = key;
|
||||
if (menu.path) {
|
||||
router.push(menu.path).catch(err => {
|
||||
if (!err.message.includes('NavigationDuplicated')) ElMessage.warning('路由跳转失败');
|
||||
});
|
||||
} else {
|
||||
ElMessage.info('该菜单暂无路由路径');
|
||||
}
|
||||
}
|
||||
|
||||
const switchTab = (tab) => {
|
||||
activeTabKey.value = tab.key;
|
||||
const findMenu = (menus, menuId) => {
|
||||
for (const menu of menus) {
|
||||
if (menu.menuId === menuId) return menu;
|
||||
if (menu.children && menu.children.length > 0) {
|
||||
const res = findMenu(menu.children, menuId);
|
||||
if (res) return res;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
const menu = findMenu(menuList.value, tab.key);
|
||||
if (menu && menu.path) {
|
||||
router.push(menu.path).catch(err => {
|
||||
if (!err.message.includes('NavigationDuplicated')) ElMessage.warning('路由跳转失败');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const closeTab = (key) => {
|
||||
const idx = tabs.value.findIndex(tab => tab.key === key);
|
||||
if (idx === -1) return;
|
||||
if (activeTabKey.value === key) {
|
||||
const nextTab = tabs.value[idx + 1] || tabs.value[idx - 1];
|
||||
if (nextTab) {
|
||||
activeTabKey.value = nextTab.key;
|
||||
switchTab(nextTab);
|
||||
} else {
|
||||
switchToHome();
|
||||
}
|
||||
}
|
||||
tabs.value.splice(idx, 1);
|
||||
}
|
||||
|
||||
const closeAllTabs = () => {
|
||||
ElMessageBox.confirm('确定关闭所有标签页?', '提示', { type: 'warning' }).then(() => {
|
||||
tabs.value = [];
|
||||
switchToHome();
|
||||
ElMessage.success('已关闭所有标签页');
|
||||
});
|
||||
}
|
||||
|
||||
const switchToHome = () => {
|
||||
activeTabKey.value = 'dashboard';
|
||||
router.push('/dashboard').catch(err => {
|
||||
if (!err.message.includes('NavigationDuplicated')) ElMessage.warning('路由跳转失败');
|
||||
});
|
||||
}
|
||||
|
||||
const scrollTab = (dir) => {
|
||||
const el = tabsScrollRef.value;
|
||||
if (el && tabs.value.length > 0) {
|
||||
const scrollBox = el.querySelector('.dynamic-tabs');
|
||||
if (scrollBox) scrollBox.scrollBy({ left: dir === 'left' ? -200 : 200, behavior: 'smooth' });
|
||||
}
|
||||
}
|
||||
|
||||
const toggleSidebar = () => {
|
||||
isCollapse.value = !isCollapse.value;
|
||||
}
|
||||
|
||||
const handleFullScreen = () => {
|
||||
try {
|
||||
if (!document.fullscreenElement) {
|
||||
document.documentElement.requestFullscreen();
|
||||
ElMessage.success('已进入全屏模式');
|
||||
} else {
|
||||
document.exitFullscreen();
|
||||
ElMessage.success('已退出全屏模式');
|
||||
}
|
||||
} catch (error) {
|
||||
ElMessage.error('全屏操作失败:' + error.message);
|
||||
}
|
||||
}
|
||||
|
||||
const handleBigScreen = () => {
|
||||
const baseUrl = window.location.origin + "/bigScreen";
|
||||
window.open(baseUrl, '_blank');
|
||||
}
|
||||
|
||||
const handleCommand = (cmd) => {
|
||||
if (cmd === 'logout') {
|
||||
ElMessageBox.confirm('确定退出系统吗?', '退出确认', { type: 'info' })
|
||||
.then(() => {
|
||||
localStorage.removeItem('loginUser');
|
||||
localStorage.removeItem('token');
|
||||
ElMessage.success('退出成功');
|
||||
router.push('/login');
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage.info('用户取消退出系统');
|
||||
});
|
||||
}
|
||||
|
||||
if (cmd === 'modifyPwd') {
|
||||
showEditPwdDialog.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
const handleEditPwdDialogClose = () => {
|
||||
showEditPwdDialog.value = false;
|
||||
if (editPwdRef.value) {
|
||||
editPwdRef.value.resetForm();
|
||||
}
|
||||
}
|
||||
|
||||
const handleDialogBeforeClose = (done) => {
|
||||
done();
|
||||
}
|
||||
|
||||
const submitEditPwd = () => {
|
||||
if (editPwdRef.value) {
|
||||
editPwdRef.value.submitForm();
|
||||
}
|
||||
}
|
||||
|
||||
const handlePwdModifySuccess = () => {
|
||||
showEditPwdDialog.value = false;
|
||||
ElMessage.success('密码修改成功,请重新登录');
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getMenuList();
|
||||
watch(() => route.path, (newPath) => {
|
||||
activeTabKey.value = newPath === '/dashboard' ? 'dashboard' : route.params.menuId || activeTabKey.value;
|
||||
}, { immediate: true });
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.app-logo {
|
||||
height: 45px;
|
||||
width: 52px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.app-container {
|
||||
--primary-color: #4285f4;
|
||||
--primary-dark: #1f2d3d;
|
||||
--tab-bg: #e8eaed;
|
||||
--tab-active-bg: #4285f4;
|
||||
--tab-text: #333;
|
||||
--tab-active-text: #fff;
|
||||
--tab-height: 28px;
|
||||
--tab-radius: 14px;
|
||||
--tab-padding: 0 12px;
|
||||
--divider-color: #e6e6e6;
|
||||
--header-bg-color: #c6e2ff; /* 统一头部背景色变量 */
|
||||
}
|
||||
|
||||
.app-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20px;
|
||||
height: 60px !important;
|
||||
background: var(--header-bg-color);
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: var(--primary-color);
|
||||
letter-spacing: 1px;
|
||||
line-height: 45px; /* 与logo图片高度一致,保证垂直居中 */
|
||||
}
|
||||
|
||||
.header-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.header-icon-btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
color: #333 !important;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s; /* 统一过渡效果 */
|
||||
}
|
||||
|
||||
/* 核心修改:悬浮背景色与头部背景色一致 */
|
||||
.header-icon-btn:hover {
|
||||
background: var(--header-bg-color) !important;
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.user-info:hover {
|
||||
background: var(--header-bg-color);
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.app-aside {
|
||||
background: var(--primary-dark) !important;
|
||||
height: calc(100vh - 60px) !important;
|
||||
transition: width 0.2s ease;
|
||||
}
|
||||
|
||||
.aside-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.menu-scroll-container {
|
||||
flex: 1;
|
||||
padding-right: 0;
|
||||
height: calc(100% - 60px);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: #2c3e50 #1f2d3d;
|
||||
}
|
||||
|
||||
.menu-scroll-container:not([style*="overflowY: hidden"]) {
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.menu-scroll-container::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.menu-scroll-container::-webkit-scrollbar-track {
|
||||
background: #1f2d3d;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.menu-scroll-container::-webkit-scrollbar-thumb {
|
||||
background: #2c3e50;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.menu-scroll-container::-webkit-scrollbar-thumb:hover {
|
||||
background: #409eff;
|
||||
}
|
||||
|
||||
.app-menu {
|
||||
height: 100%;
|
||||
border-right: none !important;
|
||||
}
|
||||
|
||||
.aside-footer {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--primary-dark);
|
||||
border-top: 1px solid #2c3e50;
|
||||
}
|
||||
|
||||
.fold-btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: transparent;
|
||||
color: #e5e9f2;
|
||||
border: none;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.fold-btn:hover {
|
||||
background: #2c3e50;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.fold-btn-active {
|
||||
background: #0f48b9 !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
height: calc(100vh - 60px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #f8f9fa;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
padding: 4px 8px;
|
||||
background: #f1f3f4;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
|
||||
.tabs-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.scroll-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
background: #fff;
|
||||
color: #666;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.scroll-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.scroll-btn:hover:not(:disabled) {
|
||||
background: #e8eaed;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.tabs-scroll-box {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.dynamic-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
overflow-x: auto;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.dynamic-tabs::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: var(--tab-padding);
|
||||
height: var(--tab-height);
|
||||
border-radius: var(--tab-radius);
|
||||
background: var(--tab-bg);
|
||||
color: var(--tab-text);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 1px 1px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.tab-active {
|
||||
background: var(--tab-active-bg) !important;
|
||||
color: var(--tab-active-text) !important;
|
||||
}
|
||||
|
||||
.tab-icon {
|
||||
font-size: 14px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.tab-close-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.8;
|
||||
transition: all 0.2s;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tab-close-icon:hover {
|
||||
opacity: 1;
|
||||
background: rgba(0,0,0,0.1);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.tab-active .tab-close-icon {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.close-all-btn {
|
||||
padding: 0 12px;
|
||||
height: 28px;
|
||||
border-radius: 14px;
|
||||
background: #fff;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.close-all-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.close-all-btn:hover:not(:disabled) {
|
||||
background: #e8eaed;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.content-container {
|
||||
flex: 1;
|
||||
padding: 0 !important;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
margin: 16px;
|
||||
padding: 24px;
|
||||
background: #fff;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 8px;
|
||||
min-height: calc(100% - 32px);
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
:deep(.el-sub-menu .el-menu) {
|
||||
background-color: #2c3e50 !important;
|
||||
}
|
||||
:deep(.el-sub-menu .el-menu-item) {
|
||||
padding-left: 40px !important;
|
||||
}
|
||||
:deep(.el-sub-menu .el-sub-menu .el-menu-item) {
|
||||
padding-left: 60px !important;
|
||||
}
|
||||
:deep(.el-menu-item.is-active) {
|
||||
background-color: #2c3e50 !important;
|
||||
color: #409eff !important;
|
||||
}
|
||||
:deep(.el-sub-menu__title:hover) {
|
||||
background-color: #2c3e50 !important;
|
||||
}
|
||||
:deep(.el-dropdown-menu) {
|
||||
border: 1px solid #e6e6e6;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
:deep(.el-tooltip__popper) {
|
||||
padding: 4px 8px;
|
||||
font-size: 12px;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog) {
|
||||
--dialog-divider: #c6e2ff;
|
||||
--footer-height: 50px;
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog .el-dialog) {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog .el-dialog__header) {
|
||||
padding: 8px 20px;
|
||||
border-bottom: 1px solid var(--dialog-divider);
|
||||
background: #fff !important;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
margin: 0 !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog .el-dialog__title) {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog .el-dialog__body) {
|
||||
padding: 12px 20px;
|
||||
border-bottom: 1px solid var(--dialog-divider);
|
||||
background: #fff !important;
|
||||
margin: 0 !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog .el-dialog__footer) {
|
||||
height: var(--footer-height) !important;
|
||||
line-height: var(--footer-height) !important;
|
||||
padding: 0 20px !important;
|
||||
border-top: 1px solid var(--dialog-divider);
|
||||
background: #fff !important;
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
text-align: right !important;
|
||||
margin: 0 !important;
|
||||
min-height: unset !important;
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: flex-end !important;
|
||||
gap: 12px;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
height: 100% !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
:deep(.dialog-footer .el-button) {
|
||||
margin: 0 !important;
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
:deep(.custom-pwd-dialog .el-dialog__headerbtn) {
|
||||
top: 8px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -1,33 +1,85 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Login from '@/views/Login.vue'
|
||||
import Page404 from '@/views/error/404.vue'
|
||||
import Layout from '@/components/Layout/index.vue'
|
||||
import Dashboard from '@/views/desktop/index.vue'
|
||||
import bigScreen from '@/views/screen/index.vue'
|
||||
|
||||
// 扫描规则保持不变
|
||||
const modules = import.meta.glob('../views/**/index.vue', {
|
||||
eager: false,
|
||||
import: 'default'
|
||||
})
|
||||
|
||||
const generateRoutes = () => {
|
||||
const routes = []
|
||||
|
||||
Object.entries(modules).forEach(([filePath, module]) => {
|
||||
const excludePaths = [
|
||||
'views/Login.vue',
|
||||
'views/desktop/index.vue',
|
||||
'views/error/',
|
||||
'views/screen/',
|
||||
]
|
||||
if (excludePaths.some(path => filePath.includes(path))) {
|
||||
return
|
||||
}
|
||||
|
||||
const routePath = filePath
|
||||
.replace('../views', '')
|
||||
.replace('.vue', '')
|
||||
.toLowerCase()
|
||||
|
||||
const routeName = routePath
|
||||
.split('/')
|
||||
.filter(Boolean)
|
||||
.map(seg => seg.charAt(0).toUpperCase() + seg.slice(1))
|
||||
.join('')
|
||||
|
||||
routes.push({
|
||||
path: routePath,
|
||||
name: routeName || 'SystemRoleIndex',
|
||||
component: module
|
||||
})
|
||||
})
|
||||
|
||||
return routes
|
||||
}
|
||||
|
||||
// 路由规则
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/login' // 默认跳登录页
|
||||
redirect: '/login'
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: Login,
|
||||
meta: {
|
||||
isPublic: true // 标记为公开页面,无需登录
|
||||
}
|
||||
meta: { isPublic: true }
|
||||
},
|
||||
{
|
||||
path: '/dashboard',
|
||||
name: 'Dashboard',
|
||||
component: Dashboard,
|
||||
meta: {
|
||||
requiresAuth: true // 需要登录验证
|
||||
}
|
||||
path: '/bigScreen',
|
||||
name: 'bigScreen',
|
||||
component: bigScreen,
|
||||
meta: { requiresAuth: true }
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
meta: { requiresAuth: true },
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
component: Dashboard
|
||||
},
|
||||
...generateRoutes()
|
||||
]
|
||||
},
|
||||
// 关键补充:404兜底路由(匹配所有未定义的前端路由)
|
||||
{
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/login' // 未知路径重定向到登录页
|
||||
name: 'Page404',
|
||||
component: Page404
|
||||
}
|
||||
]
|
||||
|
||||
@@ -39,15 +91,12 @@ const router = createRouter({
|
||||
}
|
||||
})
|
||||
|
||||
// 路由守卫:验证登录状态(优化版,增加容错)
|
||||
router.beforeEach((to, from, next) => {
|
||||
// 公开页面直接放行
|
||||
if (to.meta.isPublic) {
|
||||
next()
|
||||
return
|
||||
}
|
||||
|
||||
// 非公开页面校验token
|
||||
try {
|
||||
const token = localStorage.getItem('token')
|
||||
if (token && token.trim() !== '') {
|
||||
|
||||
@@ -68,13 +68,13 @@ const handleLogin = async () => {
|
||||
isLoading.value = true;
|
||||
const res = await login(loginForm.value);
|
||||
localStorage.setItem('token', res.token);
|
||||
localStorage.setItem('userName', res.userName);
|
||||
localStorage.setItem('loginUser', JSON.stringify(res.loginUser));
|
||||
ElMessage.success('登录成功!');
|
||||
setTimeout(() => {
|
||||
router.push('/dashboard');
|
||||
}, 3000);
|
||||
} catch (error) {
|
||||
ElMessage.error(res.msg);
|
||||
console.log(error);
|
||||
}finally{
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
||||
@@ -1,356 +1,17 @@
|
||||
<template>
|
||||
<div class="big-screen-container">
|
||||
<header class="screen-header">
|
||||
<div class="title-center">
|
||||
<h1 class="main-title">{{ screenTitle }}</h1>
|
||||
</div>
|
||||
<div class="tabs-container">
|
||||
<div class="tabs-left">
|
||||
<div
|
||||
class="tab-item"
|
||||
v-for="tab in allTabs"
|
||||
:key="tab.moduleCode"
|
||||
:class="{ active: activeTab === tab.moduleCode }"
|
||||
@click="switchTab(tab.moduleCode)"
|
||||
>
|
||||
<span>{{ tab.moduleName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="query-group">
|
||||
<el-date-picker
|
||||
type="year"
|
||||
v-model="queryDate"
|
||||
popper-class="dark-date-popper"
|
||||
value-format="YYYY"
|
||||
></el-date-picker>
|
||||
<button class="query-btn" @click="handleQuery">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="screen-content">
|
||||
<div v-if="activeTab === 'home'" class="screen-page">
|
||||
<HomeIndex :formParams="FormValues" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'work'" class="screen-page">
|
||||
<WorkIndex :formParams="FormValues" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'werp'" class="screen-page">
|
||||
<ErpIndex :formParams="FormValues" />
|
||||
</div>
|
||||
</main>
|
||||
<!-- Dashboard自身的内容(后台首页) -->
|
||||
<div class="dashboard-container">
|
||||
<h1>后台首页</h1>
|
||||
<div class="stats">数据概览、快捷入口等</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import HomeIndex from './screen/Home/index.vue';
|
||||
import ErpIndex from './screen/Erp/index.vue';
|
||||
import WorkIndex from './screen/Work/index.vue';
|
||||
|
||||
import { getHomeModuleList } from '@/api/bizApi'
|
||||
|
||||
const screenTitle = ref('个人数字化可视化看板');
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
|
||||
const FormValues = ref({
|
||||
reqParam: currentYear
|
||||
});
|
||||
|
||||
const allTabs = ref([])
|
||||
|
||||
const activeTab = ref('home')
|
||||
const queryDate = ref();
|
||||
|
||||
const switchTab = (key) => {
|
||||
activeTab.value = key
|
||||
}
|
||||
|
||||
const handleQuery = () => {
|
||||
FormValues.value.reqParam = queryDate.value;
|
||||
}
|
||||
|
||||
async function getList() {
|
||||
try {
|
||||
const res = await getHomeModuleList()
|
||||
allTabs.value = res || []
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
vList.value = []
|
||||
}
|
||||
}
|
||||
|
||||
const initApp = () =>{
|
||||
queryDate.value = currentYear;
|
||||
getList();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
initApp();
|
||||
});
|
||||
// 无需引入Layout,Layout已作为路由层的父组件
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dark-date-popper {
|
||||
z-index: 9999 !important;
|
||||
background-color: #0f3460 !important;
|
||||
border: 1px solid #1a508b !important;
|
||||
}
|
||||
.dark-date-popper .el-picker-panel,
|
||||
.dark-date-popper .el-date-range-picker,
|
||||
.dark-date-popper .el-date-range-picker__header,
|
||||
.dark-date-popper .el-date-table,
|
||||
.dark-date-popper .el-date-table th,
|
||||
.dark-date-popper .el-date-table td {
|
||||
background-color: #0f3460 !important;
|
||||
color: #e0e6ff !important;
|
||||
border-color: #1a508b !important;
|
||||
}
|
||||
.dark-date-popper .el-date-range-picker__content .el-date-range-picker__header {
|
||||
background-color: #154580 !important;
|
||||
}
|
||||
.dark-date-popper .el-date-range-picker__content {
|
||||
background-color: #0f3460 !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table td.current,
|
||||
.dark-date-popper .el-date-table td.start-date,
|
||||
.dark-date-popper .el-date-table td.end-date {
|
||||
background-color: #3c9cff !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table td.in-range {
|
||||
background-color: rgba(60, 156, 255, 0.25) !important;
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table-cell {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table-cell::before,
|
||||
.dark-date-popper .el-date-table-cell::after {
|
||||
background-color: transparent !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table td.in-range .el-date-table-cell::before {
|
||||
background-color: rgba(60, 156, 255, 0.25) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.big-screen-container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background-color: #0a1929;
|
||||
background-image: inherit;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.big-screen-container::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(15, 52, 96, 0.85);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.screen-header {
|
||||
height: 75px;
|
||||
padding: 0 2vw;
|
||||
border-bottom: 1px solid #1a508b;
|
||||
background: url('@/assets/images/biaoti.png') no-repeat center center,
|
||||
linear-gradient(90deg, rgba(15, 52, 96, 0.8), rgba(21, 69, 128, 0.8));
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.title-center {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999 !important;
|
||||
padding: 4px 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 32px;
|
||||
font-weight: 720;
|
||||
background: linear-gradient(90deg, #3c9cff, #82b9ff);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
white-space: nowrap;
|
||||
z-index: 9999 !important;
|
||||
letter-spacing: 2px;
|
||||
text-shadow: 0 0 8px rgba(60, 156, 255, 0.8);
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 0 2vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
z-index: 10;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.tabs-left {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 0 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
background: url('@/assets/images/button1.png') no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
color: #e0e6ff;
|
||||
text-align: center;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.tab-item:hover {
|
||||
background: url('@/assets/images/button1.png') no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: url('@/assets/images/button2.png') no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.4);
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.query-group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-input),
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-input__inner) {
|
||||
background-color: #0f3460 !important;
|
||||
color: #e0e6ff !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-input.is-focus .el-input__wrapper) {
|
||||
box-shadow: 0 0 0 1px #3c9cff inset !important;
|
||||
}
|
||||
|
||||
:deep(.el-date-editor .el-range-input) {
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
|
||||
:deep(.el-date-editor .el-range-separator) {
|
||||
color: #e0e6ff !important;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
.query-btn {
|
||||
height: 36px;
|
||||
padding: 0 20px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(90deg, #1a508b, #3c9cff);
|
||||
border: 1px solid #1a508b;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.query-btn:hover {
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.6);
|
||||
background: linear-gradient(90deg, #154580, #2b8ed8);
|
||||
}
|
||||
|
||||
.screen-content {
|
||||
flex: 1;
|
||||
padding: 12px;
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
height: calc(100vh - 75px);
|
||||
}
|
||||
|
||||
.screen-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
background: rgba(15, 52, 96, 0.8);
|
||||
border: 1px solid #1a508b;
|
||||
border-radius: 12px;
|
||||
backdrop-filter: blur(8px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 1600px) {
|
||||
.main-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
.tab-item {
|
||||
padding: 0 18px;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.query-btn {
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
padding: 0 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 900px) {
|
||||
.screen-header {
|
||||
height: 65px;
|
||||
}
|
||||
.tabs-container {
|
||||
height: 36px;
|
||||
}
|
||||
.tab-item {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.query-btn {
|
||||
height: 32px;
|
||||
}
|
||||
.screen-content {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 65px);
|
||||
}
|
||||
.dashboard-container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
66
screen-vue/src/views/error/404.vue
Normal file
66
screen-vue/src/views/error/404.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="page-404">
|
||||
<div class="error-code">404</div>
|
||||
<div class="error-message">页面不存在</div>
|
||||
<button @click="goBack" class="back-btn">返回上一页</button>
|
||||
<button @click="goDashboard" class="home-btn">返回首页</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
router.go(-1)
|
||||
}
|
||||
|
||||
// 返回后台首页
|
||||
const goDashboard = () => {
|
||||
router.push('/dashboard')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page-404 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.error-code {
|
||||
font-size: 80px;
|
||||
font-weight: bold;
|
||||
color: #e54d42;
|
||||
}
|
||||
|
||||
.error-message {
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.back-btn, .home-btn {
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
background: #f5f5f5;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.home-btn {
|
||||
background: #1989fa;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
288
screen-vue/src/views/screen/Home/components/user/form.vue
Normal file
288
screen-vue/src/views/screen/Home/components/user/form.vue
Normal file
@@ -0,0 +1,288 @@
|
||||
<template>
|
||||
<el-form
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
ref="formRef"
|
||||
label-width="100px"
|
||||
class="dialog-form-container"
|
||||
>
|
||||
<div class="form-row">
|
||||
<div class="form-col">
|
||||
<el-form-item label="登录账户" prop="userName">
|
||||
<el-input
|
||||
v-model="formData.userName"
|
||||
placeholder="请输入登录账户"
|
||||
clearable
|
||||
:disabled="isEdit"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-col">
|
||||
<el-form-item label="用户名称" prop="uname">
|
||||
<el-input
|
||||
v-model="formData.uname"
|
||||
placeholder="请输入用户名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-col">
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select
|
||||
v-model="formData.sex"
|
||||
placeholder="请选择性别"
|
||||
clearable
|
||||
popper-class="theme-select-popper"
|
||||
>
|
||||
<el-option label="男" value="男" />
|
||||
<el-option label="女" value="女" />
|
||||
<el-option label="未知" value="未知" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-col">
|
||||
<el-form-item label="电子邮箱" prop="email">
|
||||
<el-input
|
||||
v-model="formData.email"
|
||||
placeholder="请输入电子邮箱"
|
||||
clearable
|
||||
type="email"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-col">
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="formData.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
type="tel"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-col">
|
||||
<el-form-item label="用户角色" prop="roleId">
|
||||
<el-select
|
||||
v-model="formData.roleId"
|
||||
placeholder="请选择用户角色"
|
||||
clearable
|
||||
popper-class="theme-select-popper"
|
||||
>
|
||||
<el-option label="管理员" value="0" />
|
||||
<el-option label="普通用户" value="1" />
|
||||
<el-option label="访客" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-col">
|
||||
<el-form-item label="系统模块" prop="groupModuleId">
|
||||
<el-select
|
||||
v-model="formData.groupModuleId"
|
||||
placeholder="请选择系统模块"
|
||||
clearable
|
||||
popper-class="theme-select-popper"
|
||||
>
|
||||
<el-option label="模块A" value="0" />
|
||||
<el-option label="模块B" value="1" />
|
||||
<el-option label="模块C" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="form-col">
|
||||
<el-form-item label="登录状态" prop="ustatus">
|
||||
<el-select
|
||||
v-model="formData.ustatus"
|
||||
placeholder="请选择登录状态"
|
||||
clearable
|
||||
popper-class="theme-select-popper"
|
||||
>
|
||||
<el-option label="停用" value="0" />
|
||||
<el-option label="在用" value="1" />
|
||||
<el-option label="锁定" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
required: true,
|
||||
default: () => ({
|
||||
uname: '',
|
||||
userName: '',
|
||||
sex: '',
|
||||
email: '',
|
||||
phone: '',
|
||||
roleId : '',
|
||||
groupModuleId: '',
|
||||
ustatus: '1',
|
||||
})
|
||||
},
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const formRef = ref(null)
|
||||
|
||||
const formRules = {
|
||||
uname: [ { required: true, message: '请输入用户名称', trigger: 'blur' } ],
|
||||
userName: [ { required: true, message: '请输入登录账户', trigger: 'blur' } ],
|
||||
sex: [ { required: true, message: '请选择性别', trigger: 'change' } ],
|
||||
roleId: [ { required: true, message: '请选择用户角色', trigger: 'change' } ],
|
||||
groupModuleId: [ { required: true, message: '请选择系统模块', trigger: 'change' } ],
|
||||
ustatus: [ { required: true, message: '请选择登录状态', trigger: 'change' } ],
|
||||
}
|
||||
|
||||
const validate = async () => {
|
||||
if (!formRef.value) return false
|
||||
try {
|
||||
const valid = await formRef.value.validate()
|
||||
return valid
|
||||
} catch (error) {
|
||||
console.error('表单验证失败:', error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
const resetForm = () => {
|
||||
if (formRef.value) formRef.value.resetFields()
|
||||
}
|
||||
|
||||
defineExpose({ validate, resetForm })
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 表单容器 - 带边框,不溢出 */
|
||||
.dialog-form-container {
|
||||
width: 100%;
|
||||
padding: 16px;
|
||||
margin: 0;
|
||||
border: 1px solid rgba(64, 158, 255, 0.15);
|
||||
border-radius: 8px;
|
||||
background-color: rgba(10, 30, 60, 0.08);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 布局样式 */
|
||||
.form-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
margin: 0 0 16px 0;
|
||||
gap: 20px;
|
||||
}
|
||||
.form-row:last-child { margin-bottom: 0; }
|
||||
.form-col { flex: 1; min-width: 180px; }
|
||||
|
||||
/* 表单标签 */
|
||||
:deep(.el-form-item) { margin-bottom: 0 !important; }
|
||||
:deep(.el-form-item__label) {
|
||||
color: #e0e6ff !important;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
}
|
||||
:deep(.el-form-item__error) {
|
||||
color: #f56c6c !important;
|
||||
font-size: 12px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* ========== 终极统一输入框/下拉框样式 ========== */
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-select__wrapper) {
|
||||
background-color: rgba(10, 30, 60, 0.6) !important;
|
||||
border: 1px solid rgba(64, 158, 255, 0.3) !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: 4px !important;
|
||||
background-image: none !important;
|
||||
opacity: 1 !important;
|
||||
transition: all 0s ease 0s !important; /* 彻底禁用过渡动画 */
|
||||
--el-input-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-input-hover-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-input-focus-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-input-focus-box-shadow: none !important;
|
||||
--el-input-text-color: #e0e6ff !important;
|
||||
--el-input-placeholder-color: rgba(224, 230, 255, 0.6) !important;
|
||||
}
|
||||
|
||||
/* 强制覆盖所有状态,包括伪类和内置类名 */
|
||||
:deep(.el-input__wrapper:hover),
|
||||
:deep(.el-select__wrapper:hover),
|
||||
:deep(.el-input__wrapper.is-focus),
|
||||
:deep(.el-select__wrapper.is-focus),
|
||||
:deep(.el-input__wrapper:focus-within),
|
||||
:deep(.el-select__wrapper:focus-within),
|
||||
:deep(.el-input__wrapper.el-input__wrapper--focus),
|
||||
:deep(.el-select__wrapper.el-select__wrapper--focus),
|
||||
:deep(.el-input__wrapper:active),
|
||||
:deep(.el-select__wrapper:active) {
|
||||
background-color: rgba(10, 30, 60, 0.6) !important;
|
||||
border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
box-shadow: none !important;
|
||||
outline: none !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 内部输入框/选择器彻底透明化 */
|
||||
:deep(.el-select),
|
||||
:deep(.el-select .el-input),
|
||||
:deep(.el-input),
|
||||
:deep(.el-input__inner),
|
||||
:deep(.el-select__inner) {
|
||||
background-color: transparent !important;
|
||||
color: #e0e6ff !important;
|
||||
box-shadow: none !important;
|
||||
outline: none !important;
|
||||
border: none !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 占位符样式 */
|
||||
:deep(.el-input__placeholder),
|
||||
:deep(.el-select__placeholder) {
|
||||
color: rgba(224, 230, 255, 0.6) !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* 图标样式 */
|
||||
:deep(.el-icon) {
|
||||
color: #e0e6ff !important;
|
||||
background-color: transparent !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 禁用状态 */
|
||||
:deep(.el-input.is-disabled .el-input__wrapper),
|
||||
:deep(.el-select.is-disabled .el-select__wrapper) {
|
||||
background-color: rgba(10, 30, 60, 0.4) !important;
|
||||
border-color: rgba(64, 158, 255, 0.2) !important;
|
||||
color: rgba(224, 230, 255, 0.5) !important;
|
||||
--el-input-disabled-bg-color: rgba(10, 30, 60, 0.4) !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 错误状态 */
|
||||
:deep(.el-form-item.is-error .el-input__wrapper),
|
||||
:deep(.el-form-item.is-error .el-select__wrapper) {
|
||||
border-color: #f56c6c !important;
|
||||
--el-input-border-color: #f56c6c !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
</style>
|
||||
@@ -3,41 +3,33 @@
|
||||
<div class="search-border-container">
|
||||
<el-form :model="searchForm" class="search-form">
|
||||
<div class="form-items-wrapper">
|
||||
<el-form-item label="交易名称:" class="form-item">
|
||||
<el-form-item label="用户名称:" class="form-item">
|
||||
<el-input
|
||||
v-model="searchForm.flowName"
|
||||
placeholder="请输入交易名称"
|
||||
v-model="searchForm.uname"
|
||||
placeholder="请输入用户名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="交易类型:" class="form-item">
|
||||
<el-select
|
||||
v-model="searchForm.transactionType"
|
||||
placeholder="请选择交易类型"
|
||||
<el-form-item label="登录账户:" class="form-item">
|
||||
<el-input
|
||||
v-model="searchForm.userName"
|
||||
placeholder="请输入登录账户"
|
||||
clearable
|
||||
class="custom-select"
|
||||
popper-class="theme-select-popper"
|
||||
>
|
||||
<el-option label="收入" value="2" />
|
||||
<el-option label="支出" value="1" />
|
||||
</el-select>
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="交易分类:" class="form-item">
|
||||
<el-form-item label="登录状态:" class="form-item">
|
||||
<el-select
|
||||
v-model="searchForm.categoryId"
|
||||
placeholder="请选择交易分类"
|
||||
v-model="searchForm.ustatus"
|
||||
placeholder="请选择登录状态"
|
||||
clearable
|
||||
class="custom-select"
|
||||
popper-class="theme-select-popper"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in categoryList"
|
||||
:key="item.categoryId"
|
||||
:label="item.categoryName"
|
||||
:value="item.categoryId"
|
||||
/>
|
||||
<el-option label="停用" value="0" />
|
||||
<el-option label="再用" value="1" />
|
||||
<el-option label="锁定" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
@@ -70,6 +62,7 @@
|
||||
empty-text="暂无相关数据"
|
||||
class="data-table"
|
||||
v-loading="loading"
|
||||
loading-text="正在加载数据..."
|
||||
:header-cell-style="{
|
||||
background: 'rgba(10, 30, 60, 0.8)',
|
||||
color: '#a0cfff',
|
||||
@@ -86,17 +79,49 @@
|
||||
borderBottom: '1px solid rgba(64, 158, 255, 0.2)'
|
||||
}"
|
||||
>
|
||||
<el-table-column prop="flowId" label="交易编号" />
|
||||
<el-table-column prop="flowName" label="交易名称" />
|
||||
<el-table-column prop="categoryName" label="交易分类" />
|
||||
<el-table-column prop="tranType" label="交易类型" />
|
||||
<el-table-column prop="amount" label="交易金额">
|
||||
<el-table-column prop="createTime" label="记录日期" />
|
||||
<el-table-column prop="userName" label="登录账户" />
|
||||
<el-table-column prop="uname" label="用户名称" />
|
||||
<el-table-column prop="sex" label="性别" />
|
||||
<el-table-column prop="email" label="电子邮箱" />
|
||||
<el-table-column prop="phone" label="联系电话" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
width="180"
|
||||
:header-cell-style="{
|
||||
padding: '0 10px',
|
||||
textAlign: 'center'
|
||||
}"
|
||||
:cell-style="{
|
||||
padding: '0 10px',
|
||||
textAlign: 'center'
|
||||
}"
|
||||
>
|
||||
<template #default="scope">
|
||||
¥{{ scope.row.amount }}
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleEdit(scope.row)"
|
||||
icon="Edit"
|
||||
circle
|
||||
/>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="handleDelete(scope.row)"
|
||||
icon="Delete"
|
||||
circle
|
||||
/>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleStatusChange(scope.row)"
|
||||
icon="Switch"
|
||||
circle
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="交易备注" />
|
||||
<el-table-column prop="transactionTime" label="交易时间" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
@@ -115,27 +140,43 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
:title="dialogTitle"
|
||||
width="80%"
|
||||
class="custom-dialog"
|
||||
:close-on-click-modal="false"
|
||||
:destroy-on-close="true"
|
||||
>
|
||||
<VForm
|
||||
ref="formRef"
|
||||
:form-data="formData"
|
||||
:is-edit="isEdit"
|
||||
/>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false" class="dialog-cancel-btn">取消</el-button>
|
||||
<el-button type="primary" @click="handleSubmit">保存</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { Plus, Search, Refresh } from '@element-plus/icons-vue'
|
||||
|
||||
const props = defineProps({
|
||||
formParams: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
})
|
||||
import { ref, onMounted, reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Plus, Search, Refresh, Edit, Delete, Switch } from '@element-plus/icons-vue'
|
||||
import { getHomeUserList } from '@/api/bizUser'
|
||||
import VForm from './form.vue';
|
||||
|
||||
const loading = ref(false)
|
||||
const categoryList = ref([])
|
||||
|
||||
const searchForm = reactive({
|
||||
flowName: '',
|
||||
transactionType: '',
|
||||
categoryId: ''
|
||||
uname: '',
|
||||
ustatus: '',
|
||||
userName: ''
|
||||
})
|
||||
|
||||
const tableData = ref([])
|
||||
@@ -144,29 +185,111 @@ const currentPage = ref(1)
|
||||
const pageSize = ref(20)
|
||||
const total = ref(0)
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const dialogTitle = ref('')
|
||||
const isEdit = ref(false)
|
||||
const formData = ref({})
|
||||
const formRef = ref(null)
|
||||
|
||||
const handleAdd = () => {
|
||||
console.log('点击新增按钮')
|
||||
dialogTitle.value = '新增用户'
|
||||
isEdit.value = false
|
||||
formData.value = {
|
||||
uname: '',
|
||||
userName: '',
|
||||
sex: '',
|
||||
email: '',
|
||||
phone: '',
|
||||
roleId: '',
|
||||
groupModuleId: '',
|
||||
ustatus: '1'
|
||||
}
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
const handleEdit = (row) => {
|
||||
dialogTitle.value = '编辑用户'
|
||||
isEdit.value = true
|
||||
formData.value = { ...row }
|
||||
dialogVisible.value = true
|
||||
console.log('点击编辑按钮', row)
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
try {
|
||||
// 调用子组件的表单验证
|
||||
const isValid = await formRef.value.validate()
|
||||
if (!isValid) return
|
||||
|
||||
if (isEdit.value) {
|
||||
console.log('编辑用户提交数据:', formData.value)
|
||||
} else {
|
||||
console.log('新增用户提交数据:', formData.value)
|
||||
}
|
||||
|
||||
dialogVisible.value = false
|
||||
await getList()
|
||||
ElMessage.success(isEdit.value ? '编辑成功' : '新增成功')
|
||||
} catch (error) {
|
||||
console.error('提交失败:', error)
|
||||
ElMessage.error(isEdit.value ? '编辑失败' : '新增失败')
|
||||
}
|
||||
}
|
||||
|
||||
const handleDelete = (row) => {
|
||||
console.log('点击删除按钮', row)
|
||||
}
|
||||
|
||||
const handleStatusChange = (row) => {
|
||||
console.log('点击状态切换按钮', row)
|
||||
}
|
||||
|
||||
const handleSearch = () => {
|
||||
getList();
|
||||
}
|
||||
|
||||
const handleReset = () => {
|
||||
Object.assign(searchForm, {
|
||||
flowName: '',
|
||||
transactionType: '',
|
||||
categoryId: ''
|
||||
uname: '',
|
||||
ustatus: '',
|
||||
userName: ''
|
||||
})
|
||||
currentPage.value = 1
|
||||
currentPage.value = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
const handleSizeChange = (val) => {
|
||||
pageSize.value = val
|
||||
getList()
|
||||
}
|
||||
|
||||
const handleCurrentChange = (val) => {
|
||||
currentPage.value = val
|
||||
getList()
|
||||
}
|
||||
|
||||
async function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
const reqParmas = {
|
||||
... searchForm,
|
||||
pageNum: currentPage.value,
|
||||
pageSize: pageSize.value,
|
||||
}
|
||||
const res = await getHomeUserList(reqParmas);
|
||||
total.value = res.total;
|
||||
tableData.value = res.list || [];
|
||||
} catch (error) {
|
||||
console.error('获取数据失败:', error);
|
||||
tableData.value = [];
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getList();
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -248,6 +371,7 @@ const handleCurrentChange = (val) => {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
min-height: 200px;
|
||||
background-color: rgba(10, 30, 60, 0.08);
|
||||
}
|
||||
|
||||
.data-table {
|
||||
@@ -267,63 +391,110 @@ const handleCurrentChange = (val) => {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
color: #e0e6ff !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* ========== 终极统一输入框/下拉框样式 ========== */
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-select__wrapper),
|
||||
:deep(.el-input__wrapper:hover),
|
||||
:deep(.el-select__wrapper:hover),
|
||||
:deep(.el-input__wrapper.is-focus),
|
||||
:deep(.el-select__wrapper.is-focus),
|
||||
:deep(.el-input__wrapper:focus-within),
|
||||
:deep(.el-select__wrapper:focus-within),
|
||||
:deep(.el-input__wrapper:not(.is-focus)),
|
||||
:deep(.el-select__wrapper:not(.is-focus)),
|
||||
:deep(.el-input__wrapper:not(:focus-within)),
|
||||
:deep(.el-select__wrapper:not(:focus-within)) {
|
||||
:deep(.el-select__wrapper) {
|
||||
background-color: rgba(10, 30, 60, 0.6) !important;
|
||||
border: 1px solid rgba(64, 158, 255, 0.3) !important;
|
||||
box-shadow: none !important;
|
||||
border-radius: 4px !important;
|
||||
background-image: none !important;
|
||||
opacity: 1 !important;
|
||||
transition: none !important;
|
||||
transition: all 0s ease 0s !important; /* 彻底禁用过渡动画 */
|
||||
--el-input-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-input-hover-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-input-focus-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-input-focus-box-shadow: none !important;
|
||||
--el-input-bg-color: transparent !important;
|
||||
--el-select-bg-color: transparent !important;
|
||||
--el-input-text-color: #e0e6ff !important;
|
||||
--el-input-placeholder-color: rgba(224, 230, 255, 0.6) !important;
|
||||
}
|
||||
|
||||
/* 强制覆盖所有状态,包括伪类和内置类名 */
|
||||
:deep(.el-input__wrapper:hover),
|
||||
:deep(.el-select__wrapper:hover),
|
||||
:deep(.el-input__wrapper.is-focus),
|
||||
:deep(.el-select__wrapper.is-focus),
|
||||
:deep(.el-input__wrapper:focus-within),
|
||||
:deep(.el-select__wrapper:focus-within),
|
||||
:deep(.el-input__wrapper.el-input__wrapper--focus),
|
||||
:deep(.el-select__wrapper.el-select__wrapper--focus),
|
||||
:deep(.el-input__wrapper:active),
|
||||
:deep(.el-select__wrapper:active) {
|
||||
background-color: rgba(10, 30, 60, 0.6) !important;
|
||||
border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
box-shadow: none !important;
|
||||
outline: none !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 内部输入框/选择器彻底透明化 */
|
||||
:deep(.el-select),
|
||||
:deep(.el-select .el-input),
|
||||
:deep(.el-select .el-input__wrapper),
|
||||
:deep(.el-input),
|
||||
:deep(.el-input__inner),
|
||||
:deep(.el-select__inner),
|
||||
:deep(.el-select-v2__inner),
|
||||
:deep(.el-input__inner:focus),
|
||||
:deep(.el-input__inner:not(:focus)),
|
||||
:deep(.el-select__inner:focus),
|
||||
:deep(.el-select__inner:not(:focus)) {
|
||||
:deep(.el-select-v2__inner) {
|
||||
background-color: transparent !important;
|
||||
color: #e0e6ff !important;
|
||||
box-shadow: none !important;
|
||||
outline: none !important;
|
||||
border: none !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 占位符样式 */
|
||||
:deep(.el-input__placeholder),
|
||||
:deep(.el-select__placeholder) {
|
||||
color: rgba(224, 230, 255, 0.6) !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* 图标样式 */
|
||||
:deep(.el-select__suffix-inner>.el-icon),
|
||||
:deep(.el-input__suffix-inner>.el-icon),
|
||||
:deep(.el-input__clear),
|
||||
:deep(.el-select__clear) {
|
||||
color: #e0e6ff !important;
|
||||
background-color: transparent !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* 禁用状态 */
|
||||
:deep(.el-input.is-disabled .el-input__wrapper),
|
||||
:deep(.el-select.is-disabled .el-select__wrapper) {
|
||||
background-color: rgba(10, 30, 60, 0.4) !important;
|
||||
border-color: rgba(64, 158, 255, 0.2) !important;
|
||||
color: rgba(224, 230, 255, 0.5) !important;
|
||||
--el-input-disabled-bg-color: rgba(10, 30, 60, 0.4) !important;
|
||||
transition: all 0s ease 0s !important;
|
||||
}
|
||||
|
||||
/* ========== 原有样式 ========== */
|
||||
:deep(.el-table .el-button--small) {
|
||||
margin: 0 2px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.el-table__fixed-right) {
|
||||
background-color: transparent !important;
|
||||
border-left: 1px solid rgba(64, 158, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
:deep(.el-table__fixed-right::before) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-form-item__label) {
|
||||
color: #e0e6ff !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
:deep(.custom-pagination) {
|
||||
@@ -404,6 +575,8 @@ const handleCurrentChange = (val) => {
|
||||
--el-table-stripe-row-bg-color: rgba(10, 30, 60, 0.3);
|
||||
background-color: transparent !important;
|
||||
border: none !important;
|
||||
--el-loading-background-color: rgba(10, 30, 60, 0.8) !important;
|
||||
--el-loading-text-color: #a0cfff !important;
|
||||
}
|
||||
|
||||
:deep(.el-table th) {
|
||||
@@ -471,6 +644,55 @@ const handleCurrentChange = (val) => {
|
||||
--el-button-hover-text-color: #fff !important;
|
||||
}
|
||||
|
||||
:deep(.custom-dialog) {
|
||||
--el-dialog-bg-color: rgba(10, 30, 60, 0.9) !important;
|
||||
--el-dialog-border-color: rgba(64, 158, 255, 0.3) !important;
|
||||
--el-dialog-title-color: #e0e6ff !important;
|
||||
--el-dialog-text-color: #e0e6ff !important;
|
||||
backdrop-filter: blur(4px);
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__header) {
|
||||
border-bottom: 1px solid rgba(64, 158, 255, 0.2) !important;
|
||||
padding-bottom: 12px !important;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__body) {
|
||||
padding: 20px !important;
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
|
||||
:deep(.el-dialog__footer) {
|
||||
border-top: 1px solid rgba(64, 158, 255, 0.2) !important;
|
||||
padding-top: 12px !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
:deep(.dialog-cancel-btn) {
|
||||
background-color: rgba(10, 30, 60, 0.8) !important;
|
||||
border: 1px solid rgba(100, 116, 139, 0.5) !important;
|
||||
color: #94a3b8 !important;
|
||||
--el-button-hover-bg-color: rgba(10, 30, 60, 0.9) !important;
|
||||
--el-button-hover-border-color: rgba(148, 163, 184, 0.8) !important;
|
||||
--el-button-hover-text-color: #cbd5e1 !important;
|
||||
}
|
||||
|
||||
/* 修复Loading样式 - 核心修复 */
|
||||
:deep(.el-loading-mask) {
|
||||
background-color: rgba(10, 30, 60, 0.8) !important;
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
:deep(.el-loading-spinner) {
|
||||
--el-loading-color: #409EFF !important;
|
||||
}
|
||||
|
||||
:deep(.el-loading-spinner .el-loading-text) {
|
||||
color: #a0cfff !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.data-container::-webkit-scrollbar,
|
||||
:deep(.el-table__body-wrapper)::-webkit-scrollbar,
|
||||
.table-wrapper::-webkit-scrollbar {
|
||||
@@ -494,6 +716,7 @@ const handleCurrentChange = (val) => {
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/* 全局下拉菜单样式(父子组件共用) */
|
||||
.theme-select-popper {
|
||||
background-color: rgba(10, 30, 60, 0.85) !important;
|
||||
border: 1px solid rgba(64, 158, 255, 0.3) !important;
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="content-container">
|
||||
<!-- 核心修改:给content-item添加full-height类 -->
|
||||
<div v-if="activeMenuId === 1" class="content-item full-height">
|
||||
<UserIndex :formParams="formParams" />
|
||||
<UserIndex />
|
||||
</div>
|
||||
<div v-else-if="activeMenuId === 2" class="content-item default-content">
|
||||
<h2>业务分析</h2>
|
||||
356
screen-vue/src/views/screen/index.vue
Normal file
356
screen-vue/src/views/screen/index.vue
Normal file
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<div class="big-screen-container">
|
||||
<header class="screen-header">
|
||||
<div class="title-center">
|
||||
<h1 class="main-title">{{ screenTitle }}</h1>
|
||||
</div>
|
||||
<div class="tabs-container">
|
||||
<div class="tabs-left">
|
||||
<div
|
||||
class="tab-item"
|
||||
v-for="tab in allTabs"
|
||||
:key="tab.moduleCode"
|
||||
:class="{ active: activeTab === tab.moduleCode }"
|
||||
@click="switchTab(tab.moduleCode)"
|
||||
>
|
||||
<span>{{ tab.moduleName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="query-group">
|
||||
<el-date-picker
|
||||
type="year"
|
||||
v-model="queryDate"
|
||||
popper-class="dark-date-popper"
|
||||
value-format="YYYY"
|
||||
></el-date-picker>
|
||||
<button class="query-btn" @click="handleQuery">查询</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="screen-content">
|
||||
<div v-if="activeTab === 'home'" class="screen-page">
|
||||
<HomeIndex :formParams="FormValues" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'work'" class="screen-page">
|
||||
<WorkIndex :formParams="FormValues" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'werp'" class="screen-page">
|
||||
<ErpIndex :formParams="FormValues" />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import HomeIndex from './Home/index.vue';
|
||||
import ErpIndex from './Erp/index.vue';
|
||||
import WorkIndex from './Work/index.vue';
|
||||
|
||||
import { getHomeModuleList } from '@/api/bizApi'
|
||||
|
||||
const screenTitle = ref('个人数字化可视化看板');
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
|
||||
const FormValues = ref({
|
||||
reqParam: currentYear
|
||||
});
|
||||
|
||||
const allTabs = ref([])
|
||||
|
||||
const activeTab = ref('home')
|
||||
const queryDate = ref();
|
||||
|
||||
const switchTab = (key) => {
|
||||
activeTab.value = key
|
||||
}
|
||||
|
||||
const handleQuery = () => {
|
||||
FormValues.value.reqParam = queryDate.value;
|
||||
}
|
||||
|
||||
async function getList() {
|
||||
try {
|
||||
const res = await getHomeModuleList()
|
||||
allTabs.value = res || []
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
vList.value = []
|
||||
}
|
||||
}
|
||||
|
||||
const initApp = () =>{
|
||||
queryDate.value = currentYear;
|
||||
getList();
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
initApp();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.dark-date-popper {
|
||||
z-index: 9999 !important;
|
||||
background-color: #0f3460 !important;
|
||||
border: 1px solid #1a508b !important;
|
||||
}
|
||||
.dark-date-popper .el-picker-panel,
|
||||
.dark-date-popper .el-date-range-picker,
|
||||
.dark-date-popper .el-date-range-picker__header,
|
||||
.dark-date-popper .el-date-table,
|
||||
.dark-date-popper .el-date-table th,
|
||||
.dark-date-popper .el-date-table td {
|
||||
background-color: #0f3460 !important;
|
||||
color: #e0e6ff !important;
|
||||
border-color: #1a508b !important;
|
||||
}
|
||||
.dark-date-popper .el-date-range-picker__content .el-date-range-picker__header {
|
||||
background-color: #154580 !important;
|
||||
}
|
||||
.dark-date-popper .el-date-range-picker__content {
|
||||
background-color: #0f3460 !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table td.current,
|
||||
.dark-date-popper .el-date-table td.start-date,
|
||||
.dark-date-popper .el-date-table td.end-date {
|
||||
background-color: #3c9cff !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table td.in-range {
|
||||
background-color: rgba(60, 156, 255, 0.25) !important;
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table-cell {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table-cell::before,
|
||||
.dark-date-popper .el-date-table-cell::after {
|
||||
background-color: transparent !important;
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.dark-date-popper .el-date-table td.in-range .el-date-table-cell::before {
|
||||
background-color: rgba(60, 156, 255, 0.25) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.big-screen-container {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background-color: #0a1929;
|
||||
background-image: inherit;
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.big-screen-container::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(15, 52, 96, 0.85);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.screen-header {
|
||||
height: 75px;
|
||||
padding: 0 2vw;
|
||||
border-bottom: 1px solid #1a508b;
|
||||
background: url('@/assets/images/biaoti.png') no-repeat center center,
|
||||
linear-gradient(90deg, rgba(15, 52, 96, 0.8), rgba(21, 69, 128, 0.8));
|
||||
background-size: cover;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.title-center {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 9999 !important;
|
||||
padding: 4px 20px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 32px;
|
||||
font-weight: 720;
|
||||
background: linear-gradient(90deg, #3c9cff, #82b9ff);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
white-space: nowrap;
|
||||
z-index: 9999 !important;
|
||||
letter-spacing: 2px;
|
||||
text-shadow: 0 0 8px rgba(60, 156, 255, 0.8);
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
padding: 0 2vw;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
z-index: 10;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.tabs-left {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 0 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
background: url('@/assets/images/button1.png') no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
color: #e0e6ff;
|
||||
text-align: center;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.tab-item:hover {
|
||||
background: url('@/assets/images/button1.png') no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: url('@/assets/images/button2.png') no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.4);
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.query-group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
:deep(.el-input),
|
||||
:deep(.el-input__wrapper),
|
||||
:deep(.el-input__inner) {
|
||||
background-color: #0f3460 !important;
|
||||
color: #e0e6ff !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
:deep(.el-input.is-focus .el-input__wrapper) {
|
||||
box-shadow: 0 0 0 1px #3c9cff inset !important;
|
||||
}
|
||||
|
||||
:deep(.el-date-editor .el-range-input) {
|
||||
color: #e0e6ff !important;
|
||||
}
|
||||
|
||||
:deep(.el-date-editor .el-range-separator) {
|
||||
color: #e0e6ff !important;
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
|
||||
.query-btn {
|
||||
height: 36px;
|
||||
padding: 0 20px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(90deg, #1a508b, #3c9cff);
|
||||
border: 1px solid #1a508b;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.query-btn:hover {
|
||||
box-shadow: 0 2px 8px rgba(60, 156, 255, 0.6);
|
||||
background: linear-gradient(90deg, #154580, #2b8ed8);
|
||||
}
|
||||
|
||||
.screen-content {
|
||||
flex: 1;
|
||||
padding: 12px;
|
||||
display: block;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
height: calc(100vh - 75px);
|
||||
}
|
||||
|
||||
.screen-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
background: rgba(15, 52, 96, 0.8);
|
||||
border: 1px solid #1a508b;
|
||||
border-radius: 12px;
|
||||
backdrop-filter: blur(8px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media (max-width: 1600px) {
|
||||
.main-title {
|
||||
font-size: 24px;
|
||||
}
|
||||
.tab-item {
|
||||
padding: 0 18px;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.query-btn {
|
||||
height: 32px;
|
||||
font-size: 14px;
|
||||
padding: 0 18px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 900px) {
|
||||
.screen-header {
|
||||
height: 65px;
|
||||
}
|
||||
.tabs-container {
|
||||
height: 36px;
|
||||
}
|
||||
.tab-item {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.query-btn {
|
||||
height: 32px;
|
||||
}
|
||||
.screen-content {
|
||||
padding: 10px;
|
||||
height: calc(100vh - 65px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
42
screen-vue/src/views/system/index.vue
Normal file
42
screen-vue/src/views/system/index.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<!-- 模板部分:只能有一个根元素,用div包裹 -->
|
||||
<div class="sys-home-container">
|
||||
<el-card title="系统首页" shadow="hover">
|
||||
<div class="home-content">
|
||||
<h2>欢迎使用后台管理系统</h2>
|
||||
<p>当前访问路径:/syshome</p>
|
||||
<p>这是 Layout 子路由的正常渲染内容,不会展示代码</p>
|
||||
<el-button type="primary" @click="testBtn">测试按钮</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
// 脚本部分:使用setup语法糖,无语法错误
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
// 测试方法
|
||||
const testBtn = () => {
|
||||
ElMessage.success('按钮点击成功!')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 样式部分:scoped确保样式隔离 */
|
||||
.sys-home-container {
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.home-content {
|
||||
margin-top: 20px;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.home-content h2 {
|
||||
color: #409eff;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
8
screen-vue/src/views/system/menu/index.vue
Normal file
8
screen-vue/src/views/system/menu/index.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
8
screen-vue/src/views/system/role/index.vue
Normal file
8
screen-vue/src/views/system/role/index.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
8
screen-vue/src/views/system/user/index.vue
Normal file
8
screen-vue/src/views/system/user/index.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -2,6 +2,8 @@ package com.mini.mybigscreen.Auth;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class routeController {
|
||||
@@ -10,9 +12,15 @@ public class routeController {
|
||||
/**
|
||||
* 路由跳转
|
||||
*/
|
||||
@GetMapping({"/", "/login", "/dashboard"})
|
||||
@GetMapping({"/", "/login", "/bigScreen", "/dashboard"})
|
||||
public String forwardToIndex() {
|
||||
return "forward:/index.html";
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/**/{path:[^.]*}")
|
||||
public String redirect(@PathVariable String path) {
|
||||
return "forward:/index.html";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.mini.mybigscreen.Auth;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mini.mybigscreen.Model.LoginRequest;
|
||||
import com.mini.mybigscreen.Model.Result;
|
||||
import com.mini.mybigscreen.Model.loginUser;
|
||||
import com.mini.mybigscreen.Model.userInfo;
|
||||
import com.mini.mybigscreen.biz.domain.HomeUser;
|
||||
import com.mini.mybigscreen.biz.service.HomeUserService;
|
||||
import com.mini.mybigscreen.utils.AesUtil;
|
||||
@@ -36,7 +38,7 @@ public class userController {
|
||||
HttpSession session = request.getSession(true);
|
||||
session.setAttribute("userName", user.getUserName());
|
||||
session.setAttribute("token", token);
|
||||
return Result.success(token);
|
||||
return Result.success(new userInfo(token, new loginUser(user.getUname(), user.getUserId(), user.getRoleId(), user.getUserName())));
|
||||
}
|
||||
return Result.error("账号或密码错误");
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ public class WebConfig implements WebMvcConfigurer {
|
||||
.addPathPatterns("/**") // 拦截所有路径
|
||||
.excludePathPatterns(
|
||||
"/",
|
||||
"/login",
|
||||
"/index.html",
|
||||
"/userLogin"
|
||||
)
|
||||
|
||||
36
src/main/java/com/mini/mybigscreen/Model/Menu.java
Normal file
36
src/main/java/com/mini/mybigscreen/Model/Menu.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package com.mini.mybigscreen.Model;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.HomeMenu;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Menu implements Serializable {
|
||||
|
||||
private String menuId;
|
||||
private String parentId;
|
||||
private String menuName;
|
||||
private String menuType;
|
||||
private String path;
|
||||
private String menuIcon;
|
||||
private Integer sort;
|
||||
private Integer isIframe;
|
||||
// 子菜单列表
|
||||
private List<HomeMenu> children;
|
||||
|
||||
|
||||
public Menu(String menuId,String parentId, String menuName, String menuType, String path,String menuIcon, Integer sort, Integer isIframe,List<HomeMenu> children) {
|
||||
this.menuId = menuId;
|
||||
this.parentId = parentId;
|
||||
this.menuName = menuName;
|
||||
this.menuType = menuType;
|
||||
this.path = path;
|
||||
this.menuIcon = menuIcon;
|
||||
this.sort = sort;
|
||||
this.isIframe = isIframe;
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
@@ -12,4 +12,12 @@ public class PageResult<T> implements Serializable {
|
||||
private Integer currentPage; // 当前页码
|
||||
private Integer pageSize; // 每页条数
|
||||
private Integer total; // 总记录数
|
||||
|
||||
|
||||
public PageResult(List<T> list,Integer currentPage,Integer pageSize,Integer total){
|
||||
this.list = list;
|
||||
this.currentPage = currentPage;
|
||||
this.pageSize = pageSize;
|
||||
this.total = total;
|
||||
}
|
||||
}
|
||||
|
||||
21
src/main/java/com/mini/mybigscreen/Model/loginUser.java
Normal file
21
src/main/java/com/mini/mybigscreen/Model/loginUser.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package com.mini.mybigscreen.Model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class loginUser implements Serializable {
|
||||
|
||||
private String uname;
|
||||
private String userId;
|
||||
private String roleId;
|
||||
private String userName;
|
||||
|
||||
public loginUser(String uname, String userId, String roleId, String userName) {
|
||||
this.uname = uname;
|
||||
this.userId = userId;
|
||||
this.roleId = roleId;
|
||||
this.userName = userName;
|
||||
}
|
||||
}
|
||||
19
src/main/java/com/mini/mybigscreen/Model/userInfo.java
Normal file
19
src/main/java/com/mini/mybigscreen/Model/userInfo.java
Normal file
@@ -0,0 +1,19 @@
|
||||
package com.mini.mybigscreen.Model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class userInfo implements Serializable {
|
||||
|
||||
private String token;
|
||||
private loginUser loginUser;
|
||||
|
||||
public userInfo(String token, loginUser loginUser) {
|
||||
this.token = token;
|
||||
this.loginUser = loginUser;
|
||||
}
|
||||
}
|
||||
@@ -40,13 +40,8 @@ public class ErpTransactionFlowController {
|
||||
.eq(StrUtil.isNotBlank(transactionType), "transaction_type", transactionType)
|
||||
.orderByDesc("create_time");
|
||||
List<ErpTransactionFlow> flowList = flowService.list(query);
|
||||
PageUtil<ErpTransactionFlow> pageUtil = new PageUtil<>(pageNum, pageSize, flowList);
|
||||
List<ErpTransactionFlow> pageData = pageUtil.OkData();
|
||||
PageResult<ErpTransactionFlow> result = new PageResult<>();
|
||||
result.setList(pageData); // 当前页数据
|
||||
result.setCurrentPage(pageNum); // 当前页码
|
||||
result.setPageSize(pageSize); // 每页条数
|
||||
result.setTotal(flowList.size()); // 总条数
|
||||
PageUtil<ErpTransactionFlow> util = new PageUtil<>(pageNum, pageSize, flowList);
|
||||
PageResult<?> result = new PageResult<>(util.OkData(), pageNum, pageSize, flowList.size());
|
||||
return Result.success(result);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.mini.mybigscreen.biz.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mini.mybigscreen.Model.Menu;
|
||||
import com.mini.mybigscreen.Model.Result;
|
||||
import com.mini.mybigscreen.biz.domain.HomeMenu;
|
||||
import com.mini.mybigscreen.biz.service.HomeMenuService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biz/homeMenu")
|
||||
public class HomeMenuController {
|
||||
|
||||
|
||||
@Resource
|
||||
private HomeMenuService menuService;
|
||||
|
||||
|
||||
@GetMapping("list")
|
||||
public Result<?> getList() {
|
||||
List<Menu> menuList = new ArrayList<>();
|
||||
QueryWrapper<HomeMenu> query = new QueryWrapper<>();
|
||||
query.eq("ustatus", "1")
|
||||
.eq("parent_id", "0")
|
||||
.orderByAsc("sort");
|
||||
List<HomeMenu> pMenus = menuService.list(query);
|
||||
for (HomeMenu menu : pMenus) {
|
||||
QueryWrapper<HomeMenu> childQuery = new QueryWrapper<>();
|
||||
childQuery.eq("parent_id", menu.getMenuId());
|
||||
List<HomeMenu> childMenus = menuService.list(childQuery);
|
||||
menuList.add(new Menu(
|
||||
menu.getMenuId(),
|
||||
menu.getParentId(),
|
||||
menu.getMenuName(),
|
||||
menu.getMenuType(),
|
||||
menu.getPath(),
|
||||
menu.getMenuIcon(),
|
||||
menu.getSort(),
|
||||
menu.getIsIframe(),
|
||||
childMenus
|
||||
));
|
||||
}
|
||||
return Result.success(menuList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,8 +1,19 @@
|
||||
package com.mini.mybigscreen.biz.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mini.mybigscreen.Model.PageResult;
|
||||
import com.mini.mybigscreen.Model.Result;
|
||||
import com.mini.mybigscreen.biz.domain.HomeUser;
|
||||
import com.mini.mybigscreen.biz.service.HomeUserService;
|
||||
import com.mini.mybigscreen.utils.PageUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
@@ -15,4 +26,23 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping("/biz/homeUser")
|
||||
public class HomeUserController {
|
||||
|
||||
|
||||
@Resource
|
||||
private HomeUserService userService;
|
||||
|
||||
|
||||
@GetMapping("list")
|
||||
public Result<?> getList(Integer pageNum, Integer pageSize,
|
||||
String userName, String uname, String ustatus) {
|
||||
QueryWrapper<HomeUser> query = new QueryWrapper<>();
|
||||
query.like(StrUtil.isNotBlank(uname), "uname", uname)
|
||||
.eq(StrUtil.isNotBlank(ustatus), "ustatus", ustatus)
|
||||
.eq(StrUtil.isNotBlank(userName), "user_name", userName)
|
||||
.orderByDesc("create_time");
|
||||
List<HomeUser> userList = userService.list(query);
|
||||
PageUtil<HomeUser> util = new PageUtil<>(pageNum, pageSize, userList);
|
||||
PageResult<?> result = new PageResult<>(util.OkData(), pageNum, pageSize, userList.size());
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
77
src/main/java/com/mini/mybigscreen/biz/domain/HomeMenu.java
Normal file
77
src/main/java/com/mini/mybigscreen/biz/domain/HomeMenu.java
Normal file
@@ -0,0 +1,77 @@
|
||||
package com.mini.mybigscreen.biz.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-01
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("biz_home_menu")
|
||||
public class HomeMenu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@TableId(value = "menu_id", type = IdType.AUTO)
|
||||
private String menuId;
|
||||
|
||||
/**
|
||||
* 父菜单ID(0为顶级菜单)
|
||||
*/
|
||||
@TableField("parent_id")
|
||||
private String parentId;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@TableField("menu_name")
|
||||
private String menuName;
|
||||
|
||||
/**
|
||||
* 菜单类型(M=目录,C=菜单,F=按钮)
|
||||
*/
|
||||
@TableField("menu_type")
|
||||
private String menuType;
|
||||
|
||||
/**
|
||||
* 路由路径
|
||||
*/
|
||||
@TableField("path")
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@TableField("sort")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 是否外链(0=否,1=是)
|
||||
*/
|
||||
@TableField("is_iframe")
|
||||
private Integer isIframe;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@TableField("menu_icon")
|
||||
private String menuIcon;
|
||||
|
||||
@TableField("ustatus")
|
||||
private Integer ustatus;
|
||||
}
|
||||
@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -15,7 +17,7 @@ import lombok.Setter;
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-02-25
|
||||
* @since 2026-02-28
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@@ -25,7 +27,7 @@ public class HomeUser implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
private String createTime;
|
||||
|
||||
@TableId(value = "user_id", type = IdType.AUTO)
|
||||
private String userId;
|
||||
@@ -40,26 +42,50 @@ public class HomeUser implements Serializable {
|
||||
private String uname;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
* 性别
|
||||
*/
|
||||
@TableField("f_tenant_id")
|
||||
private String fTenantId;
|
||||
@TableField("sex")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 流程id
|
||||
* 电子邮件
|
||||
*/
|
||||
@TableField("f_flow_id")
|
||||
private String fFlowId;
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 流程任务主键
|
||||
* 电话号码
|
||||
*/
|
||||
@TableField("f_flow_task_id")
|
||||
private String fFlowTaskId;
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 流程任务状态
|
||||
* 角色编号
|
||||
*/
|
||||
@TableField("f_flow_state")
|
||||
private Integer fFlowState;
|
||||
@TableField("role_id")
|
||||
private String roleId;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
@TableField("group_module_id")
|
||||
private String groupModuleId;
|
||||
|
||||
/**
|
||||
* 用户状态
|
||||
*/
|
||||
@TableField("ustatus")
|
||||
private String ustatus;
|
||||
|
||||
/**
|
||||
* 累计登录次数
|
||||
*/
|
||||
@TableField("login_count")
|
||||
private Integer loginCount;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
@TableField("last_login_ip")
|
||||
private String lastLoginIp;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mini.mybigscreen.biz.mapper;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.HomeMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-01
|
||||
*/
|
||||
public interface HomeMenuMapper extends BaseMapper<HomeMenu> {
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-02-25
|
||||
* @since 2026-02-28
|
||||
*/
|
||||
public interface HomeUserMapper extends BaseMapper<HomeUser> {
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mini.mybigscreen.biz.service;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.HomeMenu;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-01
|
||||
*/
|
||||
public interface HomeMenuService extends IService<HomeMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mini.mybigscreen.biz.service.impl;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.HomeMenu;
|
||||
import com.mini.mybigscreen.biz.mapper.HomeMenuMapper;
|
||||
import com.mini.mybigscreen.biz.service.HomeMenuService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-01
|
||||
*/
|
||||
@Service
|
||||
public class HomeMenuServiceImpl extends ServiceImpl<HomeMenuMapper, HomeMenu> implements HomeMenuService {
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class demo {
|
||||
.pathInfo(Collections.singletonMap(OutputFile.xml, System.getProperty("user.dir") + "/src/main/resources/mapper"));
|
||||
})
|
||||
.strategyConfig(builder -> {
|
||||
builder.addInclude("erp_category")
|
||||
builder.addInclude("biz_home_menu")
|
||||
.addTablePrefix("biz_")
|
||||
.entityBuilder()
|
||||
.enableLombok()
|
||||
|
||||
@@ -10,6 +10,7 @@ spring.servlet.multipart.enabled=true
|
||||
spring.servlet.multipart.max-file-size=200MB
|
||||
spring.servlet.multipart.max-request-size=1000MB
|
||||
spring.servlet.multipart.file-size-threshold=10MB
|
||||
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
|
||||
## MySQL
|
||||
spring.datasource.url=jdbc:mysql://192.168.31.189:33069/work?useSSL=false&serverTimezone=UTC&characterEncoding=utf8
|
||||
spring.datasource.username=dream
|
||||
|
||||
24
src/main/resources/mapper/HomeMenuMapper.xml
Normal file
24
src/main/resources/mapper/HomeMenuMapper.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mini.mybigscreen.biz.mapper.HomeMenuMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mini.mybigscreen.biz.domain.HomeMenu">
|
||||
<id column="menu_id" property="menuId" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="menu_name" property="menuName" />
|
||||
<result column="menu_type" property="menuType" />
|
||||
<result column="path" property="path" />
|
||||
<result column="sort" property="sort" />
|
||||
<result column="is_iframe" property="isIframe" />
|
||||
<result column="menu_icon" property="menuIcon" />
|
||||
<result column="ustatus" property="ustatus" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
create_time, menu_id, parent_id, menu_name, menu_type, path, sort, is_iframe, menu_icon, ustatus
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -9,6 +9,14 @@
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="password" property="password" />
|
||||
<result column="uname" property="uname" />
|
||||
<result column="sex" property="sex" />
|
||||
<result column="email" property="email" />
|
||||
<result column="phone" property="phone" />
|
||||
<result column="role_id" property="roleId" />
|
||||
<result column="group_module_id" property="groupModuleId" />
|
||||
<result column="ustatus" property="ustatus" />
|
||||
<result column="login_count" property="loginCount" />
|
||||
<result column="last_login_ip" property="lastLoginIp" />
|
||||
<result column="f_tenant_id" property="fTenantId" />
|
||||
<result column="f_flow_id" property="fFlowId" />
|
||||
<result column="f_flow_task_id" property="fFlowTaskId" />
|
||||
@@ -17,7 +25,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
create_time, user_id, user_name, password, uname, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state
|
||||
create_time, user_id, user_name, password, uname, sex, email, phone, role_id, group_module_id, ustatus, login_count, last_login_ip, f_tenant_id, f_flow_id, f_flow_task_id, f_flow_state
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user