大屏项目初始化
This commit is contained in:
@@ -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-input
|
||||
v-model="searchForm.userName"
|
||||
placeholder="请输入登录账户"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="交易类型:" class="form-item">
|
||||
<el-form-item label="登录状态:" class="form-item">
|
||||
<el-select
|
||||
v-model="searchForm.transactionType"
|
||||
placeholder="请选择交易类型"
|
||||
v-model="searchForm.ustatus"
|
||||
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-select
|
||||
v-model="searchForm.categoryId"
|
||||
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>
|
||||
Reference in New Issue
Block a user