diff --git a/.env.development b/.env.development index 65c718e..772a8f3 100644 --- a/.env.development +++ b/.env.development @@ -4,11 +4,8 @@ VUE_APP_TITLE = Jarvis # 开发环境配置 ENV = 'development' -# Jarvis/开发环境 -VUE_APP_BASE_API = '' - # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true # VUE_APP_BASE_API = 'http://134.175.126.60:30313' -# VUE_APP_BASE_API = 'http://127.0.0.1:30313' +VUE_APP_BASE_API = 'http://192.168.8.88:30313' port = 8888 diff --git a/.env.production b/.env.production index 6ab0034..81e8b27 100644 --- a/.env.production +++ b/.env.production @@ -4,8 +4,5 @@ VUE_APP_TITLE = Jarvis # 生产环境配置 ENV = 'production' -# Jarvis/生产环境 -VUE_APP_BASE_API = '' - VUE_APP_BASE_API = 'http://134.175.126.60:30313' port = 8888 diff --git a/src/assets/styles/custom-sidebar.scss b/src/assets/styles/custom-sidebar.scss deleted file mode 100644 index 4da8712..0000000 --- a/src/assets/styles/custom-sidebar.scss +++ /dev/null @@ -1,87 +0,0 @@ -// 自定义侧边栏样式 - 适配蓝色渐变背景 -.sidebar-container { - // 覆盖Element UI菜单的默认样式 - .el-menu { - background: transparent !important; - border: none !important; - - .el-menu-item, .el-submenu__title { - color: #ffffff !important; - background: transparent !important; - - &:hover { - background-color: rgba(255, 255, 255, 0.1) !important; - color: #ffffff !important; - } - - &.is-active { - background-color: rgba(255, 255, 255, 0.2) !important; - color: #ffffff !important; - border-right: 3px solid #ffffff !important; - } - } - - .el-submenu { - .el-menu { - background-color: rgba(255, 255, 255, 0.05) !important; - - .el-menu-item { - &:hover { - background-color: rgba(255, 255, 255, 0.1) !important; - } - - &.is-active { - background-color: rgba(255, 255, 255, 0.15) !important; - color: #ffffff !important; - } - } - } - } - } - - // 图标颜色 - .svg-icon { - color: #ffffff !important; - } - - // 文字颜色 - span { - color: #ffffff !important; - } - - // 激活状态的子菜单标题 - .is-active > .el-submenu__title { - color: #ffffff !important; - } - - // 子菜单展开时的样式 - .el-submenu.is-opened > .el-submenu__title { - color: #ffffff !important; - } -} - -// 弹出菜单样式 -.el-menu--popup { - background: linear-gradient(135deg, #3aa4ef 0%, #0067e2 100%) !important; - border-radius: 8px !important; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important; - - .el-menu-item { - color: #ffffff !important; - - &:hover { - background-color: rgba(255, 255, 255, 0.1) !important; - } - - &.is-active { - background-color: rgba(255, 255, 255, 0.2) !important; - } - } -} - -// 响应式设计 -@media (max-width: 768px) { - .sidebar-container { - border-radius: 0 !important; - } -} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 1125c80..bb87292 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -3,7 +3,6 @@ @import './transition.scss'; @import './element-ui.scss'; @import './sidebar.scss'; -@import './custom-sidebar.scss'; @import './btn.scss'; body { diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index d331faa..cb4b7e6 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -12,10 +12,10 @@ } .sidebar-container { - -webkit-transition: width .28s; - transition: width 0.28s; + -webkit-transition: width .28s ease-in-out; + transition: width 0.28s ease-in-out, box-shadow 0.3s ease; width: $base-sidebar-width !important; - background: $base-menu-background; + background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); height: 100vh; position: fixed; font-size: 0px; @@ -24,9 +24,31 @@ left: 0; z-index: 1001; overflow: hidden; - border-radius: 0 24px 0 0; - -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35); - box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1); + border-radius: 0 20px 20px 0; + -webkit-box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + + // 添加悬停效果 + &:hover { + box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15); + } + + // 添加进入动画 + animation: slideInLeft 0.5s ease-out; + } + + @keyframes slideInLeft { + from { + transform: translateX(-100%); + opacity: 0; + } + to { + transform: translateX(0); + opacity: 1; + } + } // reset element-ui css .horizontal-collapse-transition { @@ -65,47 +87,114 @@ margin-right: 16px; } - .el-menu { - border: none; - height: 100%; - width: 100% !important; - font-size: 15px; // 增加菜单字体大小 - } + .el-menu { + border: none; + height: 100%; + width: 100% !important; + font-size: 14px; + background: transparent !important; + padding: 10px 0; + } - .el-menu-item, .el-submenu__title { - overflow: hidden !important; - text-overflow: ellipsis !important; - white-space: nowrap !important; - font-size: 15px; // 确保菜单项字体大小一致 - } - - // menu hover - .submenu-title-noDropdown, - .el-submenu__title { + .el-menu-item, .el-submenu__title { + overflow: hidden !important; + text-overflow: ellipsis !important; + white-space: nowrap !important; + font-size: 14px; + font-weight: 500; + color: rgba(255, 255, 255, 0.95) !important; + background: transparent !important; + border-radius: 12px; + margin: 4px 12px; + padding: 0 16px !important; + height: 48px; + line-height: 48px; + transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + position: relative; + &:hover { - background-color: rgba(255, 255, 255, 0.1) !important; + background: rgba(255, 255, 255, 0.15) !important; + color: #ffffff !important; + transform: translateX(4px); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + } + + &.is-active { + background: rgba(255, 255, 255, 0.25) !important; + color: #ffffff !important; + font-weight: 600; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); + + &::before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 4px; + height: 20px; + background: #ffffff; + border-radius: 0 2px 2px 0; + } } } - & .theme-dark .is-active > .el-submenu__title { - color: $base-menu-color-active !important; - } - - & .nest-menu .el-submenu>.el-submenu__title, - & .el-submenu .el-menu-item { - min-width: $base-sidebar-width !important; - - &:hover { - background-color: rgba(255, 255, 255, 0.1) !important; + // 子菜单样式优化 + .el-submenu { + .el-submenu__title { + border-radius: 12px; + margin: 4px 12px; + padding: 0 16px !important; + height: 48px; + line-height: 48px; + + &:hover { + background: rgba(255, 255, 255, 0.15) !important; + color: #ffffff !important; + transform: translateX(4px); + } + } + + .el-menu { + background: rgba(255, 255, 255, 0.08) !important; + border-radius: 12px; + margin: 8px 12px; + padding: 8px 0; + box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1); + + .el-menu-item { + margin: 2px 8px; + padding: 0 24px !important; + height: 40px; + line-height: 40px; + font-size: 13px; + + &:hover { + background: rgba(255, 255, 255, 0.12) !important; + transform: translateX(2px); + } + + &.is-active { + background: rgba(255, 255, 255, 0.2) !important; + + &::before { + width: 3px; + height: 16px; + } + } + } } } - - & .theme-dark .nest-menu .el-submenu>.el-submenu__title, - & .theme-dark .el-submenu .el-menu-item { - background-color: $base-sub-menu-background !important; - + + // 图标样式优化 + .svg-icon { + color: rgba(255, 255, 255, 0.8) !important; + transition: all 0.3s ease; + margin-right: 12px; + &:hover { - background-color: $base-sub-menu-hover !important; + color: #ffffff !important; + transform: scale(1.1); } } } @@ -171,8 +260,24 @@ } .sidebar-container { - transition: transform .28s; + transition: transform .28s ease-in-out; width: $base-sidebar-width !important; + border-radius: 0; + + // 移动端优化 + .el-menu-item, .el-submenu__title { + margin: 2px 8px; + padding: 0 12px !important; + height: 44px; + line-height: 44px; + font-size: 13px; + } + + .el-submenu .el-menu-item { + height: 36px; + line-height: 36px; + font-size: 12px; + } } &.hideSidebar { @@ -180,6 +285,38 @@ pointer-events: none; transition-duration: 0.3s; transform: translate3d(-$base-sidebar-width, 0, 0); + box-shadow: none; + } + } + } + + // 平板设备优化 + @media (max-width: 1024px) { + .sidebar-container { + .el-menu-item, .el-submenu__title { + font-size: 13px; + height: 44px; + line-height: 44px; + } + } + } + + // 小屏幕优化 + @media (max-width: 768px) { + .sidebar-container { + border-radius: 0; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); + + .el-menu { + padding: 8px 0; + } + + .el-menu-item, .el-submenu__title { + margin: 2px 6px; + padding: 0 10px !important; + height: 40px; + line-height: 40px; + font-size: 12px; } } } @@ -191,9 +328,55 @@ transition: none; } } + +// 弹出菜单样式优化 +.el-menu--popup { + background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important; + border-radius: 12px !important; + box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2) !important; + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + padding: 8px 0; + + .el-menu-item { + color: rgba(255, 255, 255, 0.95) !important; + margin: 2px 8px; + border-radius: 8px; + transition: all 0.3s ease; + + &:hover { + background: rgba(255, 255, 255, 0.15) !important; + color: #ffffff !important; + transform: translateX(4px); + } + + &.is-active { + background: rgba(255, 255, 255, 0.25) !important; + color: #ffffff !important; + } + } + + // 自定义滚动条 + &::-webkit-scrollbar-track-piece { + background: rgba(255, 255, 255, 0.1); + border-radius: 4px; + } + + &::-webkit-scrollbar { + width: 6px; + } + + &::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.3); + border-radius: 4px; + + &:hover { + background: rgba(255, 255, 255, 0.5); + } + } } -// when menu collapsed +// 收起状态下的样式 .el-menu--vertical { &>.el-menu { .svg-icon { @@ -204,27 +387,7 @@ .nest-menu .el-submenu>.el-submenu__title, .el-menu-item { &:hover { - // you can use $subMenuHover - background-color: rgba(58, 164, 239, 0.1) !important; - } - } - - // the scroll bar appears when the subMenu is too long - >.el-menu--popup { - max-height: 100vh; - overflow-y: auto; - - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; + background: rgba(255, 255, 255, 0.15) !important; } } } diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 90708b6..9697807 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -8,18 +8,18 @@ $tiffany: #4AB7BD; $yellow:#FEC171; $panGreen: #30B08F; -// 默认菜单主题风格 - 蓝色渐变主题 -$base-menu-color:#ffffff; +// 默认菜单主题风格 - 现代化渐变主题 +$base-menu-color:rgba(255, 255, 255, 0.95); $base-menu-color-active:#ffffff; -$base-menu-background:linear-gradient(0deg, #3aa4ef 0%, #0067e2 100%); +$base-menu-background:linear-gradient(135deg, #2c3e50 0%, #34495e 100%); $base-logo-title-color: #ffffff; $base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-background:#ffffff; $base-logo-light-title-color: #001529; -$base-sub-menu-background:rgba(255,255,255,0.1); -$base-sub-menu-hover:rgba(255,255,255,0.2); +$base-sub-menu-background:rgba(255,255,255,0.08); +$base-sub-menu-hover:rgba(255,255,255,0.15); // 自定义暗色菜单风格 /** diff --git a/src/components/ListLayout/index.vue b/src/components/ListLayout/index.vue new file mode 100644 index 0000000..a27489e --- /dev/null +++ b/src/components/ListLayout/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index d4cfab3..7bdd74b 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -31,12 +31,12 @@ export default { }, limit: { type: Number, - default: 15 + default: 10 }, pageSizes: { type: Array, default() { - return [15, 50, 100, 200,1] + return [10, 50, 100, 200,1000] } }, // 移动端页码按钮的数量端默认值5 diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 4e599f6..ac98e67 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -60,10 +60,11 @@ export default { width: 100%; height: 60px; line-height: 60px; - background: linear-gradient(90deg, #3aa4ef 0%, #0067e2 100%); + background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%); text-align: center; overflow: hidden; border-bottom: 1px solid rgba(255, 255, 255, 0.1); + backdrop-filter: blur(10px); & .sidebar-logo-link { height: 100%; diff --git a/src/views/system/jd-instruction/index.vue b/src/views/system/jd-instruction/index.vue index 2f8508b..e2f5fdd 100644 --- a/src/views/system/jd-instruction/index.vue +++ b/src/views/system/jd-instruction/index.vue @@ -200,8 +200,68 @@ export default { fillSheng() { this.form.command = '生' }, - fillMan() { + async fillMan() { + // 先尝试查询今天的数据 this.form.command = '慢单' + this.loading = true + + try { + const res = await executeInstruction({ command: '慢单' }) + this.loading = false + + if (res && (res.code === 200 || res.msg === '操作成功')) { + const data = res.data + let resultData = [] + if (Array.isArray(data)) resultData = data + else if (typeof data === 'string') resultData = data ? [data] : [] + else resultData = [] + + // 如果今天的数据为空,尝试查询昨天的数据 + if (resultData.length === 0 || (resultData.length === 1 && resultData[0].includes('无数据'))) { + this.$message.info('今天暂无慢单数据,正在查询昨天的数据...') + + // 获取昨天的日期 + const yesterday = new Date() + yesterday.setDate(yesterday.getDate() - 1) + const yesterdayStr = yesterday.toISOString().split('T')[0].replace(/-/g, '') + + this.loading = true + const yesterdayRes = await executeInstruction({ command: `慢单${yesterdayStr}` }) + this.loading = false + + if (yesterdayRes && (yesterdayRes.code === 200 || yesterdayRes.msg === '操作成功')) { + const yesterdayData = yesterdayRes.data + if (Array.isArray(yesterdayData)) this.resultList = yesterdayData + else if (typeof yesterdayData === 'string') this.resultList = yesterdayData ? [yesterdayData] : [] + else this.resultList = [] + + if (this.resultList.length > 0) { + this.$message.success(`已查询到昨天(${yesterdayStr})的慢单数据`) + } else { + this.$message.warning('昨天也没有慢单数据') + this.resultList = [] + } + } else { + this.$message.error('查询昨天数据失败') + this.resultList = [] + } + } else { + // 今天有数据,直接显示 + this.resultList = resultData + this.$message.success('已查询到今天的慢单数据') + } + + // 执行成功后刷新历史记录 + this.loadHistory() + } else { + this.$message.error(res && res.msg ? res.msg : '查询失败') + this.resultList = [] + } + } catch (error) { + this.loading = false + this.$message.error('查询失败,请稍后重试') + this.resultList = [] + } }, clearAll() { this.form.command = '' diff --git a/src/views/system/jdorder/orderList.vue b/src/views/system/jdorder/orderList.vue index ee37c16..162a94b 100644 --- a/src/views/system/jdorder/orderList.vue +++ b/src/views/system/jdorder/orderList.vue @@ -1,122 +1,134 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index ab01a4a..ecd42fb 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -1,159 +1,170 @@