main #34

Merged
charles merged 191 commits from main into prod 2025-11-19 16:18:39 +08:00
2 changed files with 111 additions and 34 deletions
Showing only changes of commit a4692cde9f - Show all commits

View File

@ -19,7 +19,7 @@ import ShowGpu from "@/views/product/productHome/capitalOnline/productItem/GpuPr
import ShowEip from "@/views/product/productHome/capitalOnline/Net/Eip/showEip/index.vue"; import ShowEip from "@/views/product/productHome/capitalOnline/Net/Eip/showEip/index.vue";
import CreateEip from "@/views/product/productHome/capitalOnline/Net/Eip/createEip/index.vue"; import CreateEip from "@/views/product/productHome/capitalOnline/Net/Eip/createEip/index.vue";
import { getHomePath } from '@/views/setting/tools' import { getHomePath } from '@/views/setting/tools'
import { h } from "vue"; // import { h } from "vue";
Vue.use(Router); Vue.use(Router);
// const originalPush = Router.prototype.push // const originalPush = Router.prototype.push
@ -323,7 +323,7 @@ export const asyncRoutes = [
// meta: {title: "概览", fullPath: "/productHome", noCache: true} // meta: {title: "概览", fullPath: "/productHome", noCache: true}
// }, // },
// 官网
{ {
path: getHomePath() == '/ncmatchHome/index' ? "/ncmatchHome" : "/homePage", path: getHomePath() == '/ncmatchHome/index' ? "/ncmatchHome" : "/homePage",
component: () => import("@/views/homePage/indexLast.vue"), component: () => import("@/views/homePage/indexLast.vue"),
@ -366,6 +366,7 @@ export const asyncRoutes = [
}] }]
}, },
// 咨询表单
{ {
path: "/consultingMangement", path: "/consultingMangement",
name: 'ConsultingMangement', name: 'ConsultingMangement',
@ -380,6 +381,7 @@ export const asyncRoutes = [
} }
] ]
}, },
// 订单管理
{ {
path: "/product", path: "/product",
name: 'product', name: 'product',
@ -1851,6 +1853,7 @@ export const asyncRoutes = [
path: "*", redirect: "/404", hidden: true, path: "*", redirect: "/404", hidden: true,
},]; },];
const createRouter = () => new Router({ const createRouter = () => new Router({
// mode: 'history', // require service support // mode: 'history', // require service support
scrollBehavior: () => ({ scrollBehavior: () => ({

View File

@ -25,6 +25,8 @@
<div class="section"> <div class="section">
<div class="bigTitle">到期预警</div> <div class="bigTitle">到期预警</div>
<!-- 表格容器用于控制宽度和溢出 -->
<div class="table-container">
<el-table <el-table
height="250px" height="250px"
border border
@ -32,16 +34,16 @@
style="width: 100%" style="width: 100%"
header-cell-class-name="table-header" header-cell-class-name="table-header"
cell-class-name="table-cell"> cell-class-name="table-cell">
<el-table-column prop="name" label="名称" width="180"></el-table-column> <el-table-column prop="name" label="名称" min-width="120"></el-table-column>
<el-table-column prop="instanceid" label="资源id" width="180"></el-table-column> <el-table-column prop="instanceid" label="资源id" min-width="120"></el-table-column>
<el-table-column prop="status" label="状态"> <el-table-column prop="status" label="状态" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.status === '即将到期' ? 'warning' : 'danger'"> <el-tag :type="scope.row.status === '即将到期' ? 'warning' : 'danger'">
{{ scope.row.status }} {{ scope.row.status }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="days" label="剩余天数"> <el-table-column prop="days" label="剩余天数" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span :class="scope.row.days < 3 ? 'critical' : ''">{{ scope.row.days }}</span> <span :class="scope.row.days < 3 ? 'critical' : ''">{{ scope.row.days }}</span>
</template> </template>
@ -49,6 +51,7 @@
</el-table> </el-table>
</div> </div>
</div> </div>
</div>
<div class="rightBox"> <div class="rightBox">
<!-- 用户信息 --> <!-- 用户信息 -->
@ -159,44 +162,68 @@ export default Vue.extend({
.mainBox { .mainBox {
background: #f5f7fa; background: #f5f7fa;
width: 100%; width: 100%;
height: calc(100vh - 80px); /* 使用视口高度减去一个固定值来适应不同屏幕 */
height: calc(100vh - 100px); /* 假设顶部导航栏等占 100px */
display: flex; display: flex;
padding: 10px; padding: 10px;
padding-bottom: 20px;
box-sizing: border-box; box-sizing: border-box;
gap: 20px; gap: 20px;
/* 移除 overflow-x: auto; 防止出现横向滚动条 */
overflow-y: auto;
/* 确保主容器不产生横向溢出 */
overflow-x: hidden;
} }
.leftBox { .leftBox {
/* 使用百分比宽度,更适应容器 */
width: 65%; width: 65%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20px; gap: 20px;
min-width: 0; /* 防止 flex 项目溢出 */
.section { .section {
background: white; background: white;
border-radius: 10px; border-radius: 10px;
padding: 20px; padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
/* 移除 flex-shrink: 0; 允许在必要时轻微收缩 */
} }
} }
.rightBox { .rightBox {
/* 使用百分比宽度 */
width: 35%; width: 35%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20px; gap: 20px;
} min-width: 0; /* 防止 flex 项目溢出 */
.card { .card {
background: white; background: white;
border-radius: 10px; border-radius: 10px;
padding: 20px; padding: 20px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
/* 移除 flex-shrink: 0; 允许在必要时轻微收缩 */
}
}
/* 表格容器样式,用于处理内部可能的溢出 */
.table-container {
width: 100%;
overflow-x: auto; /* 表格内部可能出现滚动条 */
border-radius: 4px; /* 与表格圆角匹配 */
}
/* 表格样式微调确保宽度100% */
.table-container ::v-deep .el-table {
width: 100% !important;
} }
.recUl { .recUl {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* 使用 auto-fit 和 minmax 实现更好的自适应 */
gap: 15px; gap: 15px;
list-style: none; list-style: none;
padding: 0; padding: 0;
@ -213,6 +240,7 @@ export default Vue.extend({
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-width: 0; /* 防止内部内容撑开 */
i { i {
font-size: 24px; font-size: 24px;
@ -229,7 +257,8 @@ export default Vue.extend({
} }
.overView { .overView {
grid-template-columns: repeat(2, 1fr); /* 覆盖默认的 grid-template-columns */
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 资源概览项更宽 */
li { li {
cursor: default; cursor: default;
@ -244,16 +273,21 @@ export default Vue.extend({
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
min-width: 0; /* 防止内部内容撑开 */
.title { .title {
font-size: 16px; font-size: 16px;
color: #606266; color: #606266;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.number { .number {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #303133; color: #303133;
white-space: nowrap;
} }
} }
} }
@ -274,6 +308,7 @@ export default Vue.extend({
.userImg { .userImg {
margin-right: 20px; margin-right: 20px;
flex-shrink: 0; /* 防止头像被压缩 */
.imgUser { .imgUser {
width: 80px; width: 80px;
@ -290,22 +325,30 @@ export default Vue.extend({
} }
.userBox { .userBox {
width: calc(100% - 100px); flex: 1; /* 占据剩余空间 */
min-width: 0; /* 防止内容溢出 */
h3 { h3 {
margin-top: 0; margin-top: 0;
margin-bottom: 15px; margin-bottom: 15px;
color: #303133; color: #303133;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.user-info { .user-info {
p { p {
margin: 8px 0; margin: 8px 0;
color: #606266; color: #606266;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
i { i {
margin-right: 8px; margin-right: 8px;
color: #409eff; color: #409eff;
flex-shrink: 0;
} }
} }
} }
@ -317,6 +360,7 @@ export default Vue.extend({
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-wrap: wrap; /* 在小屏幕上换行 */
.balance { .balance {
font-size: 28px; font-size: 28px;
@ -345,10 +389,14 @@ export default Vue.extend({
i { i {
color: #e6a23c; color: #e6a23c;
margin-right: 10px; margin-right: 10px;
flex-shrink: 0;
} }
span { span {
color: #606266; color: #606266;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
} }
@ -367,8 +415,34 @@ export default Vue.extend({
.table-cell { .table-cell {
padding: 8px 0 !important; padding: 8px 0 !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* 响应式调整 */
@media (max-width: 768px) {
.mainBox {
flex-direction: column;
height: auto;
overflow-x: hidden; /* 小屏幕也隐藏横向滚动 */
}
.leftBox, .rightBox {
width: 100%;
flex: none;
}
.recUl {
grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}
.overView {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
} }
</style> </style>