This commit is contained in:
ping 2025-10-20 16:05:31 +08:00
commit 33b48be461
30 changed files with 2712 additions and 1001 deletions

View File

@ -28,7 +28,7 @@ export function getReachargelogAPI(params) {
//客户充值冲账
export function editReachargelogAPI(params) {
return request({
url: `examine/upledger_examine${suffix}`,
url: `customer/mybalance.dspy`,
method: 'get',
params: params
})

View File

@ -0,0 +1,539 @@
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

View File

@ -0,0 +1,418 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>iconfont Demo</title>
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css">
<script src="iconfont.js"></script>
<!-- jQuery -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
<!-- 代码高亮 -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
<style>
.main .logo {
margin-top: 0;
height: auto;
}
.main .logo a {
display: flex;
align-items: center;
}
.main .logo .sub-title {
margin-left: 0.5em;
font-size: 22px;
color: #fff;
background: linear-gradient(-45deg, #3967FF, #B500FE);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>
</head>
<body>
<div class="main">
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
<img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
</a></h1>
<div class="nav-tabs">
<ul id="tabs" class="dib-box">
<li class="dib active"><span>Unicode</span></li>
<li class="dib"><span>Font class</span></li>
<li class="dib"><span>Symbol</span></li>
</ul>
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=5043107" target="_blank" class="nav-more">查看项目</a>
</div>
<div class="tab-container">
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe61b;</span>
<div class="name">复制</div>
<div class="code-name">&amp;#xe61b;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe64c;</span>
<div class="name">大类-全部产品</div>
<div class="code-name">&amp;#xe64c;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe641;</span>
<div class="name">资源管理器</div>
<div class="code-name">&amp;#xe641;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe616;</span>
<div class="name">社区服务</div>
<div class="code-name">&amp;#xe616;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe648;</span>
<div class="name">复制</div>
<div class="code-name">&amp;#xe648;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe602;</span>
<div class="name">订单管理</div>
<div class="code-name">&amp;#xe602;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe625;</span>
<div class="name">客服</div>
<div class="code-name">&amp;#xe625;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xebbb;</span>
<div class="name">地图_地球_o</div>
<div class="code-name">&amp;#xebbb;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe60a;</span>
<div class="name">消息</div>
<div class="code-name">&amp;#xe60a;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe65f;</span>
<div class="name">AI助手</div>
<div class="code-name">&amp;#xe65f;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
<hr>
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
<ul>
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
<li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
</ul>
<blockquote>
<p>注意:新版 iconfont 支持两种方式引用多色图标SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
</blockquote>
<p>Unicode 使用步骤如下:</p>
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1760930186762') format('woff2'),
url('iconfont.woff?t=1760930186762') format('woff'),
url('iconfont.ttf?t=1760930186762') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
<pre><code class="language-css"
>.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
<pre>
<code class="language-html"
>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看默认是 "iconfont"。</p>
</blockquote>
</div>
</div>
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-fuzhi"></span>
<div class="name">
复制
</div>
<div class="code-name">.icon-fuzhi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-dalei-quanbuchanpin"></span>
<div class="name">
大类-全部产品
</div>
<div class="code-name">.icon-dalei-quanbuchanpin
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-ziyuanguanliqi"></span>
<div class="name">
资源管理器
</div>
<div class="code-name">.icon-ziyuanguanliqi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shequfuwu"></span>
<div class="name">
社区服务
</div>
<div class="code-name">.icon-shequfuwu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-fuzhi-"></span>
<div class="name">
复制
</div>
<div class="code-name">.icon-fuzhi-
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-dingdanguanli"></span>
<div class="name">
订单管理
</div>
<div class="code-name">.icon-dingdanguanli
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-kefu"></span>
<div class="name">
客服
</div>
<div class="code-name">.icon-kefu
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-ditu_diqiu_o"></span>
<div class="name">
地图_地球_o
</div>
<div class="code-name">.icon-ditu_diqiu_o
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xiaoxi"></span>
<div class="name">
消息
</div>
<div class="code-name">.icon-xiaoxi
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-AIzhushou"></span>
<div class="name">
AI助手
</div>
<div class="code-name">.icon-AIzhushou
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
<hr>
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
<p>与 Unicode 使用方式相比,具有如下特点:</p>
<ul>
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
</code></pre>
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"
iconfont" 是你项目下的 font-family。可以通过编辑项目查看默认是 "iconfont"。</p>
</blockquote>
</div>
</div>
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fuzhi"></use>
</svg>
<div class="name">复制</div>
<div class="code-name">#icon-fuzhi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-dalei-quanbuchanpin"></use>
</svg>
<div class="name">大类-全部产品</div>
<div class="code-name">#icon-dalei-quanbuchanpin</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-ziyuanguanliqi"></use>
</svg>
<div class="name">资源管理器</div>
<div class="code-name">#icon-ziyuanguanliqi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shequfuwu"></use>
</svg>
<div class="name">社区服务</div>
<div class="code-name">#icon-shequfuwu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-fuzhi-"></use>
</svg>
<div class="name">复制</div>
<div class="code-name">#icon-fuzhi-</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-dingdanguanli"></use>
</svg>
<div class="name">订单管理</div>
<div class="code-name">#icon-dingdanguanli</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-kefu"></use>
</svg>
<div class="name">客服</div>
<div class="code-name">#icon-kefu</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-ditu_diqiu_o"></use>
</svg>
<div class="name">地图_地球_o</div>
<div class="code-name">#icon-ditu_diqiu_o</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xiaoxi"></use>
</svg>
<div class="name">消息</div>
<div class="code-name">#icon-xiaoxi</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-AIzhushou"></use>
</svg>
<div class="name">AI助手</div>
<div class="code-name">#icon-AIzhushou</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>
<hr>
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
<ul>
<li>支持多色图标了,不再受单色限制。</li>
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
</code></pre>
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
<pre><code class="language-html">&lt;style&gt;
.icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
&lt;/style&gt;
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
&lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
&lt;/svg&gt;
</code></pre>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('.tab-container .content:first').show()
$('#tabs li').click(function (e) {
var tabContent = $('.tab-container .content')
var index = $(this).index()
if ($(this).hasClass('active')) {
return
} else {
$('#tabs li').removeClass('active')
$(this).addClass('active')
tabContent.hide().eq(index).fadeIn()
}
})
})
</script>
</body>
</html>

View File

@ -0,0 +1,55 @@
@font-face {
font-family: "iconfont"; /* Project id 5043107 */
src: url('iconfont.woff2?t=1760930186762') format('woff2'),
url('iconfont.woff?t=1760930186762') format('woff'),
url('iconfont.ttf?t=1760930186762') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-fuzhi:before {
content: "\e61b";
}
.icon-dalei-quanbuchanpin:before {
content: "\e64c";
}
.icon-ziyuanguanliqi:before {
content: "\e641";
}
.icon-shequfuwu:before {
content: "\e616";
}
.icon-fuzhi-:before {
content: "\e648";
}
.icon-dingdanguanli:before {
content: "\e602";
}
.icon-kefu:before {
content: "\e625";
}
.icon-ditu_diqiu_o:before {
content: "\ebbb";
}
.icon-xiaoxi:before {
content: "\e60a";
}
.icon-AIzhushou:before {
content: "\e65f";
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,79 @@
{
"id": "5043107",
"name": "kboos",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "300409",
"name": "复制",
"font_class": "fuzhi",
"unicode": "e61b",
"unicode_decimal": 58907
},
{
"icon_id": "10621831",
"name": "大类-全部产品",
"font_class": "dalei-quanbuchanpin",
"unicode": "e64c",
"unicode_decimal": 58956
},
{
"icon_id": "11121510",
"name": "资源管理器",
"font_class": "ziyuanguanliqi",
"unicode": "e641",
"unicode_decimal": 58945
},
{
"icon_id": "12459826",
"name": "社区服务",
"font_class": "shequfuwu",
"unicode": "e616",
"unicode_decimal": 58902
},
{
"icon_id": "12562411",
"name": "复制",
"font_class": "fuzhi-",
"unicode": "e648",
"unicode_decimal": 58952
},
{
"icon_id": "19657695",
"name": "订单管理",
"font_class": "dingdanguanli",
"unicode": "e602",
"unicode_decimal": 58882
},
{
"icon_id": "2674476",
"name": "客服",
"font_class": "kefu",
"unicode": "e625",
"unicode_decimal": 58917
},
{
"icon_id": "5388029",
"name": "地图_地球_o",
"font_class": "ditu_diqiu_o",
"unicode": "ebbb",
"unicode_decimal": 60347
},
{
"icon_id": "31157387",
"name": "消息",
"font_class": "xiaoxi",
"unicode": "e60a",
"unicode_decimal": 58890
},
{
"icon_id": "44896696",
"name": "AI助手",
"font_class": "AIzhushou",
"unicode": "e65f",
"unicode_decimal": 58975
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,793 @@
<template>
<div class="message-center-wrapper">
<!-- 移动端通知弹框 -->
<el-drawer
:visible.sync="internalVisible"
v-if="isMobile"
direction="rtl"
:with-header="false"
size="90%"
class="drawerMobile"
:modal="true"
:modal-append-to-body="true"
:append-to-body="true"
@close="handleClose"
>
<el-container class="container">
<el-aside width="95px" class="aside">
<div class="header">消息中心</div>
<div class="title">
<div @click="tab(1)" :class="{ active: tab_index === 1 }" class="info">全部消息</div>
<div @click="tab(2)" :class="{ active: tab_index === 2 }" class="info">未读消息</div>
<div @click="tab(3)" :class="{ active: tab_index === 3 }" class="info">已读消息</div>
</div>
</el-aside>
<el-container class="content_box">
<el-header class="header">| {{ tabTitle }}</el-header>
<el-main class="content">
<!-- 全部信息 -->
<div v-if="tab_index == 1" class="allinfo">
<div class="button">
<el-button size="mini" type="primary" @click="readMassage">已读</el-button>
<el-button size="mini" type="danger" @click="delMessage">删除</el-button>
</div>
<el-table
:header-cell-style="rowClass"
@expand-change="expandChangeHandler"
ref="table"
@row-click="expandChangeHandler1"
class="table"
:row-class-name="rowStyle"
:data="alliInformationList ? alliInformationList : []"
height="680"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
style="width: 100%"
>
<el-table-column type="expand" width="30px">
<template slot-scope="props">
<div class="msgtext">
{{ props.row.msgtext }}
</div>
</template>
</el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="消息内容" prop="msgtype" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="sendtime" label="接收时间">
</el-table-column>
</el-table>
</div>
<!-- 未读信息 -->
<div v-if="tab_index == 2" class="noreadinfo">
<div class="button">
<el-button size="mini" type="primary" @click="readMassage">已读</el-button>
<el-button size="mini" type="danger" @click="delMessage">删除</el-button>
</div>
<el-table
:header-cell-style="rowClass"
@row-click="expandChangeHandler1"
class="table"
ref="table"
@expand-change="expandChangeHandler"
:row-class-name="rowStyle"
:data="unreadMessageList"
height="680"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
style="width: 100%"
>
<el-table-column type="expand" width="30px">
<template slot-scope="props">
<div class="msgtext">
{{ props.row.msgtext }}
</div>
</template>
</el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="消息内容" prop="msgtype" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="sendtime" label="接收时间">
</el-table-column>
</el-table>
</div>
<!-- 已读信息 -->
<div v-if="tab_index == 3" class="readinfo">
<div class="button">
<el-button size="mini" type="danger" @click="delMessage">删除</el-button>
</div>
<el-table
:header-cell-style="rowClass"
ref="table"
class="table"
@row-click="expandChangeHandler2"
@expand-change="expandChangeHandler"
@selection-change="handleSelectionChange"
:row-class-name="rowStyle"
:data="readInformationList"
height="680"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column type="expand" width="30px">
<template slot-scope="props">
<div class="msgtext">
{{ props.row.msgtext }}
</div>
</template>
</el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="消息内容" prop="msgtype" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="sendtime" label="接收时间">
</el-table-column>
</el-table>
</div>
</el-main>
</el-container>
</el-container>
</el-drawer>
<!-- 桌面端通知弹框 -->
<el-drawer
:visible.sync="internalVisible"
v-else
direction="rtl"
:with-header="false"
size="70%"
class="drawer"
:modal="true"
:modal-append-to-body="true"
:append-to-body="true"
@close="handleClose"
>
<el-container style="height: 100vh">
<el-aside width="200px" class="aside">
<div class="header" style="font-size:16px;">消息中心</div>
<div class="title">
<div @click="tab(1)" :class="{ active: tab_index === 1 }" style="font-size:16px;">全部消息</div>
<div @click="tab(2)" :class="{ active: tab_index === 2 }" style="font-size:16px;">未读消息</div>
<div @click="tab(3)" :class="{ active: tab_index === 3 }" style="font-size:16px;">已读消息</div>
</div>
</el-aside>
<el-container class="content_box">
<el-header class="header">| {{ tabTitle }}</el-header>
<el-main class="content">
<!-- 全部信息 -->
<div v-if="tab_index == 1">
<div class="button" style="display:flex;">
<el-button size="small" type="primary" @click="readMassage">已读</el-button>
<el-button size="small" type="danger" @click="delMessage">删除</el-button>
</div>
<el-table
@expand-change="expandChangeHandler"
ref="table"
@row-click="expandChangeHandler1"
class="table"
:row-class-name="rowStyle"
:data="alliInformationList ? alliInformationList : []"
height="780"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="expand" width="30px">
<template slot-scope="props">
<div class="msgtext">
{{ props.row.msgtext }}
</div>
</template>
</el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="消息内容" prop="msgtype" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="sendtime" label="接收时间">
</el-table-column>
</el-table>
</div>
<!-- 未读信息 -->
<div v-if="tab_index == 2">
<div class="button" style="display:flex;">
<el-button size="small" type="primary" @click="readMassage">已读</el-button>
<el-button size="small" type="danger" @click="delMessage">删除</el-button>
</div>
<el-table
@row-click="expandChangeHandler1"
ref="table"
@expand-change="expandChangeHandler"
:row-class-name="rowStyle"
:data="unreadMessageList"
height="780"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column type="expand" width="30px">
<template slot-scope="props">
<div class="msgtext">
{{ props.row.msgtext }}
</div>
</template>
</el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="消息内容" prop="msgtype" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="sendtime" label="接收时间">
</el-table-column>
</el-table>
</div>
<!-- 已读信息 -->
<div v-if="tab_index == 3">
<div class="button" style="display:flex;">
<el-button size="small" type="danger" @click="delMessage">删除</el-button>
</div>
<el-table
ref="table"
@row-click="expandChangeHandler2"
@expand-change="expandChangeHandler"
@selection-change="handleSelectionChange"
:row-class-name="rowStyle"
:data="readInformationList"
height="780"
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column type="expand" width="30px">
<template slot-scope="props">
<div class="msgtext">
{{ props.row.msgtext }}
</div>
</template>
</el-table-column>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="消息内容" prop="msgtype" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="sendtime" label="接收时间">
</el-table-column>
</el-table>
</div>
</el-main>
</el-container>
</el-container>
</el-drawer>
</div>
</template>
<script>
import {
getUnreadmsgAPI,
getMsgAPI,
getReadmsgAPI,
upMsgAPI,
delMsgAPI
} from "@/api/login";
export default {
name: 'MessageCenter',
props: {
userId: {
type: [String, Number],
required: false,
default: null
},
visible: {
type: Boolean,
default: false
}
},
data() {
return {
isMobile: false,
alliInformationList: [], //
unreadMessageList: [], //
readInformationList: [], //
readIdList: [],
count: 0,
internalVisible: false, //
tabTitle: "消息中心",
tab_index: 1,
isUpdate: false,
oneId: '',
isOne: false,
originalBodyOverflow: '' // body overflow
};
},
watch: {
// visible
visible: {
immediate: true,
handler(newVal) {
console.log('MessageCenter visible changed:', newVal);
this.internalVisible = newVal;
if (newVal) {
this.getMsg();
this.preventBodyScroll();
} else {
this.restoreBodyScroll();
}
}
},
// visible
internalVisible(newVal) {
if (newVal !== this.visible) {
this.$emit('update:visible', newVal);
}
if (!newVal) {
this.getUnreadmsg();
this.restoreBodyScroll();
}
}
},
mounted() {
//
this.checkMobile();
this.getUnreadmsg();
},
beforeDestroy() {
// body
this.restoreBodyScroll();
},
methods: {
//
checkMobile() {
const userAgent = window.navigator.userAgent;
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(userAgent);
console.log('Is mobile device:', this.isMobile);
},
// body
preventBodyScroll() {
this.originalBodyOverflow = document.body.style.overflow;
document.body.style.overflow = 'hidden';
},
// body
restoreBodyScroll() {
document.body.style.overflow = this.originalBodyOverflow || '';
},
//
open() {
console.log('MessageCenter open method called');
this.internalVisible = true;
this.getMsg();
this.preventBodyScroll();
},
//
close() {
console.log('MessageCenter close method called');
this.internalVisible = false;
this.restoreBodyScroll();
},
//
handleClose() {
console.log('MessageCenter handleClose called');
this.close();
},
rowClass() {
return "font-size:14px;";
},
getUnreadmsg() {
//
const userId = sessionStorage.getItem('userId');
if (!userId) {
console.log('用户未登录,跳过获取未读消息');
return;
}
getUnreadmsgAPI().then(res => {
if (res.status) {
this.count = res.count;
this.unreadMessageList = res.messages;
//
this.$emit('unread-count-update', res.count);
} else {
this.$message({
message: res.msg,
type: "error",
});
}
}).catch(error => {
console.error('获取未读消息失败:', error);
// 401
if (error.response && error.response.status !== 401) {
this.$message({
message: "获取未读消息失败",
type: "error",
});
}
});
},
getReadmsg() {
//
const userId = sessionStorage.getItem('userId');
if (!userId) {
console.log('用户未登录,跳过获取已读消息');
return;
}
getReadmsgAPI().then(res => {
if (res.status) {
this.readInformationList = res.msg;
} else {
this.$message({
message: res.msg,
type: "error",
});
}
}).catch(error => {
console.error('获取已读消息失败:', error);
this.$message({
message: "获取已读消息失败",
type: "error",
});
});
},
rowStyle({ row, rowIndex }) {
if (this.isOne == true && row.id == this.oneId) {
return 'unReadColor';
} else if (row.msgstatus == 1) {
return 'unReadColor';
}
return '';
},
handleSelectionChange(selection) {
if (selection) {
this.readIdList = [];
selection.forEach(item => {
this.readIdList.push(item.id);
});
console.log('Selected messages:', this.readIdList);
}
},
getMsg() {
//
const userId = sessionStorage.getItem('userId');
if (!userId) {
console.log('用户未登录,跳过获取消息');
return;
}
getMsgAPI({ userid: userId }).then(res => {
if (res.status && res.msg) {
this.alliInformationList = res.msg;
} else {
this.$message({
message: res.msg || "获取消息失败",
type: "error",
});
}
}).catch(error => {
console.error('获取消息失败:', error);
this.$message({
message: "获取消息失败",
type: "error",
});
});
},
readMassage() {
this.isUpdate = true;
if (this.readIdList.length) {
this.upMsg(this.readIdList);
} else {
this.$message({
message: "请选择要标记为已读的消息",
type: "warning",
});
}
},
upMsg(data) {
let params = {
msgids: data
};
upMsgAPI(params).then(res => {
if (res.status) {
this.$message({
message: "一键已读成功",
type: "success",
});
if (this.tab_index == 1) {
this.getMsg();
} else if (this.tab_index == 2) {
this.getUnreadmsg();
}
//
this.getUnreadmsg();
} else {
this.$message({
message: res.msg,
type: "error",
});
}
}).catch(error => {
console.error('标记已读失败:', error);
this.$message({
message: "标记已读失败",
type: "error",
});
});
},
delMsg(data) {
let params = {
id: data
};
delMsgAPI(params).then(res => {
if (res.status) {
this.$message({
message: "删除成功",
type: "success",
});
if (this.tab_index == 1) {
this.getMsg();
} else if (this.tab_index == 2) {
this.getUnreadmsg();
} else if (this.tab_index == 3) {
this.getReadmsg();
}
//
this.getUnreadmsg();
} else {
this.$message({
message: res.msg,
type: "error",
});
}
}).catch(error => {
console.error('删除消息失败:', error);
this.$message({
message: "删除消息失败",
type: "error",
});
});
},
delMessage() {
if (this.readIdList.length) {
this.$confirm('确定要删除选中的消息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.delMsg(this.readIdList);
}).catch(() => {
//
});
} else {
this.$message({
message: "请选择要删除的消息",
type: "warning",
});
}
},
expandChangeHandler(row) {
this.isOne = true;
this.oneId = row.id;
let params = {
msgids: [row.id]
};
upMsgAPI(params).then(res => {
if (res.status) {
this.rowStyle(row);
//
this.getUnreadmsg();
} else {
this.$message({
message: res.msg,
type: "error",
});
}
}).catch(error => {
console.error('标记消息已读失败:', error);
});
},
expandChangeHandler1(row) {
this.isUpdate = true;
if (this.$refs.table) {
this.$refs.table.toggleRowExpansion(row);
}
this.expandChangeHandler(row);
},
expandChangeHandler2(row) {
if (this.$refs.table) {
this.$refs.table.toggleRowExpansion(row);
}
},
tab(i) {
this.tab_index = i;
if (i == 1) {
this.tabTitle = "全部消息";
this.getMsg();
} else if (i == 2) {
this.tabTitle = "未读消息";
this.getUnreadmsg();
} else {
this.tabTitle = "已读消息";
this.getReadmsg();
}
}
}
};
</script>
<style scoped lang="scss">
.message-center-wrapper {
position: relative;
z-index: 10000;
}
.drawer, .drawerMobile {
z-index: 10001 !important;
::v-deep .el-drawer {
z-index: 10002 !important;
}
::v-deep .el-drawer__wrapper {
z-index: 10001 !important;
}
::v-deep .el-drawer__container {
z-index: 10001 !important;
}
::v-deep .el-drawer__header {
margin-bottom: 0;
}
}
.aside {
padding: 0;
margin: 0;
background-color: #f5f7fa;
.header {
padding-left: 20px;
height: 60px;
line-height: 60px;
font-weight: 600;
background-color: #d9dee4;
border-bottom: 1px solid #e6e6e6;
}
.title div {
padding-left: 35px;
height: 50px;
line-height: 50px;
cursor: pointer;
transition: background-color 0.3s;
&:hover {
background-color: #ebedf0;
}
&.active {
background-color: #e1e5eb;
color: #409eff;
font-weight: bold;
}
}
}
.content_box {
background-color: #fff;
padding: 0 10px;
.header {
font-size: 22px;
line-height: 60px;
border-bottom: 1px solid #e6e6e6;
font-weight: bold;
color: #333;
}
.msgtext {
padding: 15px;
background-color: #f9f9f9;
border-radius: 4px;
line-height: 1.6;
color: #666;
}
.button {
padding-bottom: 15px;
border-bottom: 1px solid #e6e6e6;
margin-bottom: 15px;
}
}
/* 表格样式优化 */
::v-deep .el-table {
.el-table__row {
cursor: pointer;
&:hover {
background-color: #f5f7fa !important;
}
}
.el-table__expanded-cell {
padding: 10px !important;
}
}
/* 移动端样式优化 */
.drawerMobile {
.container {
height: 100vh;
.aside {
.header {
font-size: 14px;
}
.title {
.info {
font-size: 12px;
padding-left: 20px;
}
}
}
.content_box {
.header {
font-size: 16px;
}
.content {
.allinfo, .readinfo, .noreadinfo {
.button {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.table {
width: 100%;
}
}
}
}
}
}
/* 响应式调整 */
@media (max-width: 768px) {
.drawerMobile {
::v-deep .el-drawer {
width: 90% !important;
}
}
}
/* 确保所有交互元素可点击 */
::v-deep .el-button {
cursor: pointer !important;
}
::v-deep .el-table__row {
cursor: pointer !important;
}
::v-deep .el-drawer__body {
overflow: auto;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -40,7 +40,7 @@ export default {
name: "Sidebar",
components: { SidebarItem, Logo },
computed: {
...mapGetters(["permission_routes", "sidebar", "userType"]), // userType
...mapGetters(["permission_routes", "sidebar", "userType", "orgType"]),
showLogo() {
return true;
@ -54,27 +54,15 @@ export default {
return !this.sidebar.opened;
},
//
permissionRoutes() {
const routes = this.permission_routes || [];
console.log("Sidebar - 当前权限路由:", routes);
console.log("Sidebar - 用户类型:", this.userType); //
//
const hasOrderManagement = routes.some(route => route.path === '/orderManagement');
const hasResourceManagement = routes.some(route => route.path === '/resourceManagement');
console.log("是否包含订单管理:", hasOrderManagement);
console.log("是否包含资源管理:", hasResourceManagement);
return routes;
},
//
activeMenu() {
const route = this.$route;
const { meta, path } = route;
// activeMenu使
if (meta.activeMenu) {
return meta.activeMenu;
}
@ -85,25 +73,6 @@ export default {
mounted() {
console.log("Sidebar mounted - 权限路由:", this.permissionRoutes);
console.log("Sidebar mounted - 用户类型:", this.userType);
},
watch: {
permission_routes: {
handler(newRoutes) {
console.log("Sidebar - 权限路由变化:", newRoutes);
},
deep: true,
immediate: true
},
//
userType: {
handler(newType) {
console.log("Sidebar - 用户类型变化:", newType);
},
immediate: true
}
}
};
</script>
@ -139,6 +108,7 @@ export default {
}
}
// -
::v-deep .el-menu-vertical {
border: none;
height: 100%;
@ -152,8 +122,36 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
//
.el-menu--inline {
//
.el-menu-item {
//
&.is-active {
background-color: #d7dafd !important;
color: #296ad9 !important;
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
background-color: #296ad9;
}
}
//
&:not(.is-active):hover {
background-color: #f5f7fa !important;
}
}
}
}
//
::v-deep .el-menu--collapse {
width: 64px !important;
min-width: 64px !important;
@ -163,6 +161,16 @@ export default {
text-overflow: clip;
justify-content: center;
}
//
.el-menu--popup {
.el-menu-item {
&.is-active {
background-color: #d7dafd !important;
color: #296ad9 !important;
}
}
}
}
}
</style>

View File

@ -4,6 +4,8 @@ import Cookies from 'js-cookie'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import '@/assets/css/iconfont/iconfont.css'
import Element from 'element-ui'
import './styles/element-variables.scss'
import 'xterm/css/xterm.css'
@ -22,7 +24,7 @@ let ploady={
start_date:'',
end_date:''
}
reqSaleMoneyList(ploady)
// reqSaleMoneyList(ploady)
// import {saveApprovalInfo} from "@/api/finance/approvalList";
// saveApprovalInfo(JSON.stringify({
// "flag":"update",
@ -98,20 +100,73 @@ Vue.use(Element, {
//设置跳转页面时给页面的body属性设置滚动条
var onOverflow = ["/shoppingManagement", "/supplierManagement"];
router.afterEach((to, from, next) => {
// 修复:在路由守卫中恢复用户状态和重新生成路由
router.beforeEach(async (to, from, next) => {
// 清空面包屑状态的代码
// store.commit('tagsView/resetBreadcrumbState');
// 新增如果已登录且有token但Vuex状态丢失从sessionStorage恢复
if (store.getters.token && (!store.getters.user || !store.getters.userType)) {
console.log("检测到状态丢失从sessionStorage恢复用户状态");
const user = sessionStorage.getItem('user');
const auths = sessionStorage.getItem('auths');
const userType = sessionStorage.getItem('userType');
const orgType = sessionStorage.getItem('orgType');
if (user) {
store.commit('user/SET_USER', user);
}
if (auths) {
store.commit('user/SET_AUTHS', JSON.parse(auths));
}
if (userType) {
store.commit('user/SET_USER_TYPE', userType);
}
if (orgType) {
store.commit('user/SET_ORG_TYPE', parseInt(orgType));
}
// 重新生成路由
try {
const accessRoutes = await store.dispatch('permission/generateRoutes', {
user: store.getters.user,
auths: store.getters.auths,
userType: store.getters.userType,
orgType: store.getters.orgType
});
// 重新添加路由
router.addRoutes(accessRoutes);
// 重定向到当前路由以确保路由更新
next({ ...to, replace: true });
return;
} catch (error) {
console.error('重新生成路由失败:', error);
}
}
onOverflow.forEach(element => {
if (to.path == element) {
document.querySelector("body").setAttribute("style", "overflow: auto !important;")
}
});
next();
});
window.addEventListener('beforeunload', function () {
// 清空面包屑状态的代码
store.commit('tagsView/resetBreadcrumbState');
});
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
Vue.config.productionTip = false
new Vue({
el: '#app',
router,

View File

@ -47,7 +47,7 @@ Vue.use(Router);
/**
* constantRoutes
没有权限要求的基本页面
所有角色都可以访问
所有角色都可以访问·
*/
export const constantRoutes = [
{
@ -325,7 +325,7 @@ export const asyncRoutes = [
]
},
// 订单管理菜单 - 保持为一级菜单,调整顺序到全部产品后面
{
path: "/orderManagement",
component: Layout,
@ -352,7 +352,6 @@ export const asyncRoutes = [
]
},
// 资源管理菜单 - 保持为一级菜单,调整顺序到订单管理后面
{
path: "/resourceManagement",

View File

@ -8,12 +8,11 @@ const getters = {
avatar: state => state.user.avatar,
name: state => state.user.name,
introduction: state => state.user.introduction,
user: state => state.user.user,
auths: state => state.user.auths,
user: state => state.user.user || sessionStorage.getItem('user') || '',
auths: state => state.user.auths || JSON.parse(sessionStorage.getItem('auths') || '[]'),
requestCode: state => state.user.requestCode,
permission_routes: state => state.permission.routes,
// 新增用户类型getter
userType: state => state.user.userType,
// errorLogs: state => state.errorLog.logs,
userType: state => state.user.userType || sessionStorage.getItem('userType') || '',
orgType: state => state.user.orgType || parseInt(sessionStorage.getItem('orgType')) || 0,
}
export default getters

View File

@ -37,7 +37,7 @@ function filterAsyncRoutes(routes, permissions) {
function addUserRoutes(routes, userType) {
console.log("addUserRoutes - userType:", userType);
// 如果是普通用户(非管理员),添加订单管理和资源管理路由
// 如果是普通用户(org_type为2),添加订单管理和资源管理路由
if (userType === 'user') {
const orderManagementRoute = routes.find(route => route.path === "/orderManagement");
const resourceManagementRoute = routes.find(route => route.path === "/resourceManagement");
@ -46,12 +46,12 @@ function addUserRoutes(routes, userType) {
if (orderManagementRoute) {
console.log("添加订单管理路由");
userRoutes.push(orderManagementRoute);
userRoutes.push(JSON.parse(JSON.stringify(orderManagementRoute))); // 深拷贝
}
if (resourceManagementRoute) {
console.log("添加资源管理路由");
userRoutes.push(resourceManagementRoute);
userRoutes.push(JSON.parse(JSON.stringify(resourceManagementRoute))); // 深拷贝
}
return userRoutes;
@ -113,15 +113,17 @@ const actions = {
return new Promise((resolve) => {
let accessedRoutes;
// 判断用户类型admin为1是管理员否则是普通用户
const userType = params.admin == 1 ? 'admin' : 'user';
console.log("用户类型:", userType);
// 从参数或sessionStorage中获取用户类型和组织类型
const userType = params.userType || sessionStorage.getItem('userType') || '';
const orgType = params.orgType || parseInt(sessionStorage.getItem('orgType')) || 0;
if (params.user.includes("admin") && params.admin == 1) {
console.log("用户类型:", userType, "orgType:", orgType);
if (params.user && params.user.includes("admin") && orgType != 2) {
// 管理员:只显示超级管理员菜单
accessedRoutes = asyncRoutes.filter(item => item.path === '/superAdministrator');
} else {
const auths = JSON.parse(JSON.stringify(params.auths));
const auths = params.auths ? JSON.parse(JSON.stringify(params.auths)) : [];
console.log("ACTION generateRoutes - auths:", auths);
if (auths.length) {
@ -144,10 +146,17 @@ const actions = {
}
// 新增:为普通用户添加订单管理和资源管理路由
if (userType === 'user') {
if (userType === 'user' || orgType == 2) {
console.log("为普通用户添加订单管理和资源管理路由");
const userSpecificRoutes = addUserRoutes(asyncRoutes, userType);
accessedRoutes = [...accessedRoutes, ...userSpecificRoutes];
// 确保不重复添加路由
userSpecificRoutes.forEach(route => {
if (!accessedRoutes.some(r => r.path === route.path)) {
accessedRoutes.push(route);
}
});
console.log("添加用户特定路由后的accessedRoutes:", accessedRoutes);
}
}

View File

@ -7,21 +7,36 @@ import store from "@/store";
import {myBalanceAPI} from "@/api/finance/customerRechargeManagement";
import {testData} from "@/views/homePage/components/topBox/testData";
// 从sessionStorage恢复状态
const getStoredState = () => {
return {
user: sessionStorage.getItem('user') || "",
auths: JSON.parse(sessionStorage.getItem('auths')) || [],
userType: sessionStorage.getItem('userType') || '',
orgType: parseInt(sessionStorage.getItem('orgType')) || '',
mybalance: sessionStorage.getItem('mybalance') || ''
};
};
const storedState = getStoredState();
const state = {
token: getToken(),
name: "",
avatar: "",
introduction: "",
//用户名称
user: "",
user: storedState.user,
//权限列表
auths: [],
auths: storedState.auths,
// 当前状态码
requestCode: 200,
//客户余额
mybalance: '',
mybalance: storedState.mybalance,
// 新增用户类型admin/user
userType: ''
userType: storedState.userType,
// 新增:组织类型
orgType: storedState.orgType
};
const mutations = {
@ -39,22 +54,28 @@ const mutations = {
},
SET_AUTHS: (state, auths) => {
state.auths = auths;
sessionStorage.setItem("auths", JSON.stringify(state.auths));
sessionStorage.setItem("auths", JSON.stringify(auths));
},
SET_USER: (state, user) => {
state.user = user;
sessionStorage.setItem("user", state.user);
sessionStorage.setItem("user", user);
},
SET_REQUESTSTATE: (state, code) => {
state.requestCode = code;
},
SETMYBANLANCE(state, mybalance) {
state.mybalance = mybalance
state.mybalance = mybalance;
sessionStorage.setItem('mybalance', mybalance);
},
// 新增:设置用户类型
SET_USER_TYPE: (state, userType) => {
state.userType = userType;
sessionStorage.setItem("userType", userType);
},
// 新增:设置组织类型
SET_ORG_TYPE: (state, orgType) => {
state.orgType = orgType;
sessionStorage.setItem("orgType", orgType.toString());
}
};
@ -62,14 +83,13 @@ const actions = {
//客户获取余额
async getCustmoersMoney({commit}) {
let result = await myBalanceAPI()
if (result.status) {
commit('SETMYBANLANCE', result.data)
sessionStorage.setItem('mybalance', result.data)
}
},
// user login
async login({commit}, userInfo) {
const {username, password, codeid, vcode} = userInfo;
return new Promise(async (resolve, reject) => {
loginUserAPI(userInfo)
@ -82,13 +102,15 @@ const actions = {
type: 'error',
})
} else {
const {data, admin} = response;
const {data, org_type} = response;
commit("SET_USER", username);
// 新增:设置用户类型
const userType = admin == 1 ? 'admin' : 'user';
// 新增:根据 org_type 设置用户类型
// org_type 为 2 表示客户,其他为管理员
const userType = org_type == 2 ? 'user' : 'admin';
commit("SET_USER_TYPE", userType);
console.log("登录用户类型:", userType);
commit("SET_ORG_TYPE", org_type);
console.log("登录用户类型:", userType, "org_type:", org_type);
data ? commit("SET_AUTHS", data) : commit("SET_AUTHS", []);
const accessRoutes = await store.dispatch(
@ -96,7 +118,8 @@ const actions = {
{
user: username,
auths: data,
admin: admin
userType: userType,
orgType: org_type
}
)
resetRouter();
@ -117,46 +140,64 @@ const actions = {
// get user info
getInfo({commit, state}) {
return new Promise((resolve, reject) => {
// getInfo(state.token).then(response => {
// const { data } = response
// if (!data) {
// reject('Verification failed, please Login again.')
// }
// const { roles, name, avatar, introduction } = data
// // roles must be a non-empty array
// if (!roles || roles.length <= 0) {
// reject('getInfo: roles must be a non-null array!')
// }
// commit('SET_ROLES', roles)
// commit('SET_NAME', name)
// commit('SET_AVATAR', avatar)
// commit('SET_INTRODUCTION', introduction)
// }).catch(error => {
// reject(error)
// })
// 从sessionStorage恢复用户信息
const user = sessionStorage.getItem('user');
const auths = sessionStorage.getItem('auths');
const userType = sessionStorage.getItem('userType');
const orgType = sessionStorage.getItem('orgType');
if (user) {
commit("SET_USER", user);
}
if (auths) {
commit("SET_AUTHS", JSON.parse(auths));
}
if (userType) {
commit("SET_USER_TYPE", userType);
}
if (orgType) {
commit("SET_ORG_TYPE", parseInt(orgType));
}
resolve({
user: state.user,
auths: state.auths,
userType: state.userType,
orgType: state.orgType
});
});
},
// user logout
logout({commit, state, dispatch}) {
return new Promise((resolve, reject) => {
logout(state.token)
.then(() => {
// logout(state.token)
// .then(() => {
commit("SET_TOKEN", "");
commit("SET_ROLES", []);
commit("SET_USER_TYPE", ""); // 新增:清除用户类型
commit("SET_ORG_TYPE", ""); // 新增:清除组织类型
commit("SET_USER", "");
commit("SET_AUTHS", []);
removeToken();
resetRouter();
// 清除sessionStorage
sessionStorage.removeItem('user');
sessionStorage.removeItem('auths');
sessionStorage.removeItem('userType');
sessionStorage.removeItem('orgType');
sessionStorage.removeItem('mybalance');
// reset visited views and cached views
// to fixed https://github.com/PanJiaChen/vue-element-admin/issues/2485
dispatch("tagsView/delAllViews", null, {root: true});
resolve();
})
.catch((error) => {
reject(error);
});
// })
// .catch((error) => {
// reject(error);
// });
});
},
@ -167,7 +208,16 @@ const actions = {
commit("SET_TOKEN", "");
commit("SET_ROLES", []);
commit("SET_USER_TYPE", ""); // 新增:清除用户类型
commit("SET_ORG_TYPE", ""); // 新增:清除组织类型
commit("SET_USER", "");
commit("SET_AUTHS", []);
removeToken();
// 清除sessionStorage
sessionStorage.removeItem('user');
sessionStorage.removeItem('auths');
sessionStorage.removeItem('userType');
sessionStorage.removeItem('orgType');
resolve();
});
},
@ -200,4 +250,5 @@ export default {
state,
mutations,
actions,
};

View File

@ -1,4 +1,5 @@
// / base color
// variables.scss
// base color
$blue: #324157;
$light-blue: #3A71A8;
$red: #C03639;
@ -9,22 +10,17 @@ $yellow: #FEC171;
$panGreen: #30B08F;
// sidebar
$menuText: #000;
$menuActiveText: #296ad9; // 当前激活菜单项的文字颜色
$subMenuActiveText: #100101; // 当前激活子菜单项的文字颜色
$menuText: #333;
$menuActiveText: #296ad9;
$subMenuActiveText: #000;
$menuBg: #fff; // 整体背景颜色
$menuHover: #f0f0f0; // 鼠标悬浮一级菜单背景色 (轻微变化更友好)
$subMenuBg: #f7f7f7; // 子菜单背景色
$subMenuHover: #eaeaea; // 鼠标悬浮子菜单背景色 (轻微变化更友好)
$menuBg: #fff;
$menuHover: #f5f7fa;
$subMenuBg: #fff;
$subMenuHover: #f0f0f0;
$sideBarWidth: 230px; // 侧边栏宽度
$sideBarWidth: 230px;
// Element UI 默认折叠宽度为 64px
// $sideBarCollapseWidth: 64px;
// the :export directive is the magic sauce for webpack
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
:export {
menuText: $menuText;
menuActiveText: $menuActiveText;
@ -34,9 +30,4 @@ $sideBarWidth: 230px; // 侧边栏宽度
subMenuBg: $subMenuBg;
subMenuHover: $subMenuHover;
sideBarWidth: $sideBarWidth;
// sideBarCollapseWidth: $sideBarCollapseWidth;
}

View File

@ -554,7 +554,7 @@ export default {
<style lang="scss" scope>
.myOranization {
height: 81vh;
height: 86vh;
.oranizationInfo {
// height: 2rem;

View File

@ -3,7 +3,7 @@
<el-row :gutter="10">
<el-col :span="8" style="overflow-x: auto;min-width: 100px;" class="treeCard">
<el-card class="left" style="font-size: 14px;overflow-x: auto!important;padding: 0!important;min-width: 200px;">
<el-button type="primary" size="small" v-if="treeData.length==[]" @click="addDepartment()">请添加部门</el-button>
<el-button type="primary" size="small" v-if="treeData.length==[]" @click="addDepartment()" style="margin-left: 14px;margin-top: 14px;">请添加部门</el-button>
<Tree id="tree" style="overflow-x: auto!important; height: calc(100vh - 106px);" v-else ref="tree" node-key="id" :tree-data="treeData" :add-form-arr="addFormArr" :add-form="addForm" @treeDelChange="treeDelChange" :default-props="defaultProps" :default-expand-all="true" :is-add-del="true" @treeSubmitChange="treeSubmitChange" @treeUpdateChange="treeUpdateChange" @treeEditChange="treeEditChange"></Tree>
</el-card>
</el-col>
@ -353,15 +353,15 @@ export default {
margin-bottom: 10px;
}
.departmentManagement {
height: 85vh;
height: 90vh;
.left {
height: 85vh;
height:90vh;
}
.right {
.button{
display:flex;
}
height: 85vh;
height: 90vh;
.userdeparment {
// font-size: 18px;
}

View File

@ -37,7 +37,7 @@
{{ getOrderTypeConfig(businessOpFilter).text }}
</el-tag>
<el-tag v-if="orderStatusFilter" size="small" closable @close="clearOrderStatusFilter"
:type="orderStatusFilter === '1' ? 'success' : orderStatusFilter === '0' ? 'danger' : 'info'">
:type="orderStatusFilter === '1' ? 'success' : orderStatusFilter === '0' ? 'danger' : 'info'">
{{ getOrderStatusText(orderStatusFilter) }}
</el-tag>
</div>
@ -49,12 +49,8 @@
<el-col :span="24">
<div class="mobile-filter">
<span class="filter-label">类型:</span>
<el-button
v-for="(config, type) in orderTypes"
:key="type"
size="mini"
:type="businessOpFilter === type ? config.buttonType : ''"
@click="handleBusinessOpFilter(type)">
<el-button v-for="(config, type) in orderTypes" :key="type" size="mini"
:type="businessOpFilter === type ? config.buttonType : ''" @click="handleBusinessOpFilter(type)">
{{ config.text }}
</el-button>
</div>
@ -66,10 +62,7 @@
<el-col :span="24">
<div class="mobile-filter">
<span class="filter-label">状态:</span>
<el-button
v-for="status in orderStatuses"
:key="status.value"
size="mini"
<el-button v-for="status in orderStatuses" :key="status.value" size="mini"
:type="orderStatusFilter === status.value ? status.buttonType : ''"
@click="handleOrderStatusFilter(status.value)">
{{ status.text }}
@ -88,66 +81,65 @@
<!-- PC端头部 -->
<el-card class="pcCard" v-else>
<div class="header-container">
<div class="search-group">
<el-select v-model="select" filterable @change="selectSearch" class="search-select" placeholder="请选择"
size="small" style="width: 100px">
<el-option label="订单号" value="id" />
<el-option label="订单日期" value="order_date" />
<!-- <el-option label="订单状态:未支付" value="0" />
<el-option label="订单状态:已支付" value="1" />
<el-option label="订单状态:已取消" value="3" /> -->
</el-select>
<!-- -->
<div class="top">
<div class="header-container">
<div class="search-group">
<el-select v-model="select" filterable @change="selectSearch" class="search-select" placeholder="请选择"
size="small" style="width: 100px">
<el-option label="订单号" value="id" />
<el-option label="订单日期" value="order_date" />
</el-select>
<el-input size="small" v-show="select == 'id'" placeholder="请输入内容" class="search-input" @input="input"
v-model="searchValue" clearable style="width: 180px; margin-left: 10px">
</el-input>
<el-input size="small" v-show="select == 'id'" placeholder="请输入内容" class="search-input" @input="input"
v-model="searchValue" clearable style="width: 180px; margin-left: 10px">
</el-input>
<div v-if="select == 'order_date'" class="date-picker-container">
<el-date-picker size="small" @change="change" v-model="value1" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd"
style="width: 240px; margin-left: 10px">
</el-date-picker>
</div>
</div>
<!-- 筛选状态显示 -->
<div v-if="hasActiveFilters" class="filter-status-pc">
<span class="filter-label">当前筛选: </span>
<el-tag v-if="businessOpFilter" size="small" closable @close="clearBusinessOpFilter">
{{ getOrderTypeConfig(businessOpFilter).text }}
</el-tag>
<el-tag v-if="orderStatusFilter" size="small" closable @close="clearOrderStatusFilter"
:type="orderStatusFilter === '1' ? 'success' : orderStatusFilter === '0' ? 'danger' : 'info'">
{{ getOrderStatusText(orderStatusFilter) }}
</el-tag>
</div>
<div class="stats-group">
<div class="stat-item">
<span class="stat-label">累计支付总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_price || '0.00' }}</span>
<div v-if="select == 'order_date'" class="date-picker-container">
<el-date-picker size="small" @change="change" v-model="value1" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd"
style="width: 240px; margin-left: 10px">
</el-date-picker>
</div>
</div>
<div class="stat-item">
<span class="stat-label">累计优惠总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_discount || '0.00' }}</span>
<!-- 筛选状态显示 -->
<div v-if="hasActiveFilters" class="filter-status-pc">
<span class="filter-label">当前筛选: </span>
<el-tag v-if="businessOpFilter" size="small" closable @close="clearBusinessOpFilter">
{{ getOrderTypeConfig(businessOpFilter).text }}
</el-tag>
<el-tag v-if="orderStatusFilter" size="small" closable @close="clearOrderStatusFilter"
:type="orderStatusFilter === '1' ? 'success' : orderStatusFilter === '0' ? 'danger' : 'info'">
{{ getOrderStatusText(orderStatusFilter) }}
</el-tag>
</div>
<div class="stats-group">
<div class="stat-item">
<span class="stat-label">累计支付总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_price || '0.00' }}</span>
</div>
</div>
<div class="stat-item">
<span class="stat-label">累计优惠总金额:</span>
<div class="stat-value">
<el-skeleton animated v-if="all_price_show" :rows="1" style="width: 80px" />
<span v-else class="price-text">¥ {{ all_discount || '0.00' }}</span>
</div>
</div>
</div>
</div>
</div>
<!-- 底部 -->
<div class="btm">
<!-- 类型筛选 -->
<div class="type-filter">
<span>订单类型筛选</span>
<el-button
v-for="(config, type) in orderTypes"
:key="type"
:type="businessOpFilter === type ? config.buttonType : ''"
@click="handleBusinessOpFilter(type)">
<el-button v-for="(config, type) in orderTypes" :key="type"
:type="businessOpFilter === type ? config.buttonType : ''" @click="handleBusinessOpFilter(type)">
{{ config.text }}
</el-button>
</div>
@ -155,9 +147,7 @@
<!-- 状态筛选 -->
<div class="status-filter">
<span>订单状态筛选</span>
<el-button
v-for="status in orderStatuses"
:key="status.value"
<el-button v-for="status in orderStatuses" :key="status.value"
:type="orderStatusFilter === status.value ? status.buttonType : ''"
@click="handleOrderStatusFilter(status.value)">
{{ status.text }}
@ -176,51 +166,70 @@
<!-- 表格部分 -->
<el-card class="orderList">
<el-table border :data="tableData" class="table" height="calc(100vh - 264px)" v-loading="all_price_show">
<el-table-column label="序号" width="180">
<template slot-scope="scope">
{{ (pagination.page - 1) * pagination.size + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column align="center" min-width="180" header-align="center" prop="product_name" label="产品名称">
</el-table-column>
<el-table-column align="center" min-width="180" header-align="center" prop="id" label="订单号"></el-table-column>
<el-table-column align="center" header-align="center" label="订单原价" prop="list_price">
<template slot-scope="scope">
{{ scope.row.list_price }}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单折后价">
<template slot-scope="scope">
{{ scope.row.amount ? "¥" + scope.row.amount : "-" }}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单类型">
<template slot-scope="scope">
<el-tag :style="{ padding: '0 8px' }" :type="getOrderTypeConfig(scope.row.business_op).type">
{{ getOrderTypeConfig(scope.row.business_op).text }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单状态">
<template slot-scope="scope">
<el-tag :style="{ padding: '0 5px' }" :type="getOrderStatusConfig(scope.row.order_status).tagType" effect="dark">
{{ getOrderStatusConfig(scope.row.order_status).text }}
</el-tag>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" prop="order_date" label="订单日期"></el-table-column>
<el-table-column align="center" header-align="center" label="操作">
<template slot-scope="scope">
<el-button size="small" v-if="scope.row.order_status === '0'" type="primary"
@click="orderDetails(scope.row)" style="padding: 8px 15px">去支付
</el-button>
<el-button size="small" v-else type="primary" @click="orderDetails(scope.row)" style="padding: 8px">
查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-box" >
<el-table border :data="tableData" class="table" height="64vh" width="100%" v-loading="all_price_show">
<el-table-column label="序号" width="120" align="center" header-align="center">
<template slot-scope="scope">
<div class="cell-content">{{ (pagination.page - 1) * pagination.size + scope.$index + 1 }}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" prop="product_name" label="产品名称" width="200" show-overflow-tooltip>
<template slot-scope="scope">
<div class="cell-content">{{ scope.row.product_name }}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" prop="id" label="订单号" show-overflow-tooltip>
<template slot-scope="scope">
<div class="cell-content">{{ scope.row.id }}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单原价" width="140">
<template slot-scope="scope">
<div class="cell-content">{{ scope.row.list_price }}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单折后价" width="140">
<template slot-scope="scope">
<div class="cell-content">{{ scope.row.amount ? "¥" + scope.row.amount : "-" }}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单类型" width="120">
<template slot-scope="scope">
<div class="cell-content">
<el-tag :type="getOrderTypeConfig(scope.row.business_op).type">
{{ getOrderTypeConfig(scope.row.business_op).text }}
</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单状态" width="120">
<template slot-scope="scope">
<div class="cell-content">
<el-tag :type="getOrderStatusConfig(scope.row.order_status).tagType" effect="dark">
{{ getOrderStatusConfig(scope.row.order_status).text }}
</el-tag>
</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="订单日期" width="150">
<template slot-scope="scope">
<div class="cell-content">{{ formatOrderDate(scope.row.order_date) }}</div>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="140">
<template slot-scope="scope">
<div class="cell-content">
<el-button size="small" v-if="scope.row.order_status === '0'" type="primary"
@click="orderDetails(scope.row)">去支付
</el-button>
<el-button size="small" v-else type="primary" @click="orderDetails(scope.row)" style="line-height: 0;">
查看详情
</el-button>
</div>
</template>
</el-table-column>
</el-table>
</div>
<!-- 分页 -->
<div class="page">
@ -330,6 +339,40 @@ export default {
this.isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(this.userAgent);
},
methods: {
// XXXX-XX-XX
formatOrderDate(dateString) {
if (!dateString) return '-';
try {
//
const date = new Date(dateString);
if (isNaN(date.getTime())) {
// Date
if (typeof dateString === 'string') {
//
const datePart = dateString.split(' ')[0];
const parts = datePart.split('-');
if (parts.length === 3) {
const year = parts[0];
const month = parts[1].padStart(2, '0');
const day = parts[2].padStart(2, '0');
return `${year}-${month}-${day}`;
}
}
return dateString; //
}
//
const year = date.getFullYear().toString();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
} catch (error) {
console.error('日期格式化错误:', error, dateString);
return dateString; //
}
},
//
getOrderTypeConfig(type) {
return this.orderTypes[type] || { text: "-", type: "primary", buttonType: "" };
@ -620,7 +663,47 @@ export default {
// PC
.pcCard {
margin-bottom: 10px;
.btm{
display: flex;
margin-top: 10px;
.type-filter{
display: flex;
align-items: center;
span {
margin-right: 8px;
font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-button {
margin-right: 5px;
padding: 7px 12px;
}
}
.status-filter {
display: flex;
align-items: center;
margin-left: 20px;
span {
margin-right: 8px;
font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-button {
margin-right: 5px;
padding: 7px 12px;
}
}
.reset {
display: flex;
align-items: center;
}
}
.header-container {
display: flex;
align-items: center;
@ -672,6 +755,7 @@ export default {
align-items: center;
font-size: 14px;
margin-left: 10px;
.stat-label {
color: #606266;
margin-right: 8px;
@ -689,35 +773,12 @@ export default {
}
}
}
.type-filter, .status-filter {
display: flex;
align-items: center;
margin-left: 20px;
span {
margin-right: 8px;
font-size: 14px;
color: #606266;
white-space: nowrap;
}
.el-button {
margin-right: 5px;
padding: 7px 12px;
}
}
.reset {
display: flex;
align-items: center;
}
}
}
.orderList {
margin-top: 10px;
height: calc(100vh - 180px);
height: calc(100vh - 214px);
.table {
width: 100%;
@ -739,6 +800,43 @@ export default {
padding: 0 8px !important;
}
//
::v-deep .el-table {
.el-table__row {
width: 100%;
height: 56px; //
}
.el-table__cell {
padding: 12px 0; //
}
.cell-content {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
min-height: 28px;
}
.el-button {
height: 32px;
// line-height: 32px;
}
}
//
::v-deep .el-table .el-table__header-wrapper {
.el-table__cell {
padding: 16px 0;
background-color: #d0cff8;
.cell {
font-weight: 600;
font-size: 14px;
}
}
}
//
@media screen and (max-width: 1200px) {
.pcCard .header-container {

View File

@ -42,7 +42,7 @@
<i class="el-icon-upload2"></i> 全部导出
</el-button>
</div>
<el-table size="large" border height="calc(100vh - 210px)" v-loading="loading" :data="tableData"
<el-table size="large" border height="calc(100vh - 250px)" v-loading="loading" :data="tableData"
style="width: 100%;border:1px solid #ccc;" element-loading-text="加载中..."
element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.8)">
<el-table-column v-if="searchData.radioType!='1'&&searchData.radioType!='3'" prop="date" label="图片" width="180">
@ -107,7 +107,7 @@
</template>
</el-table-column>
</el-table>
<el-pagination style="background-color: white;" @size-change="handleSizeChange"
<el-pagination class="pageBox" @size-change="handleSizeChange"
@current-change="handleCurrentChange" :current-page.sync="current_page" :page-size="page_size"
layout="total, prev, pager, next" :total="total_count">
</el-pagination>
@ -567,7 +567,7 @@ export default {
}
.table-box {
height: calc(100vh - 120px);
height: calc(100vh - 150px);
padding: 10px;
background-color: white;
@ -602,4 +602,9 @@ export default {
display: flex;
margin-right: 10px;
}
.pageBox{
width: 100%;
text-align: center;
margin: 10px;
}
</style>

View File

@ -1,24 +1,28 @@
<template>
<div class="top-nav">
<!-- 顶部容器根据homePath决定布局样式 -->
<div id="topContainer" class="container" :class="{ 'ncmatch-layout': homePath === '/ncmatchHome/index' }">
<!-- 当homePath不等于/ncmatchHome/index时显示logo和导航 -->
<div class="logo" v-if="homePath !== '/ncmatchHome/index'">
<!-- 顶部容器 -->
<div id="topContainer" class="container">
<!-- 统一显示logo和导航 -->
<div class="logo">
<!-- Logo图片点击跳转首页 -->
<img v-if="JSON.stringify(logoInfoNew) !== '{}'" @click="$router.push(homePath)" style="cursor:pointer;"
class="logoImg" :src="logoInfoNew.home.logoImg || ''" alt="">
<!-- 主导航菜单 -->
<nav class="main-nav" v-if="!isNcmatchHome">
<nav class="main-nav">
<div class="nav-list">
<!-- 首页 -->
<p :class="{ active: $route.path.includes('/index') }">
<a @click="$router.push(homePath)">{{ translations[language].home }}</a>
<a @click="$router.push('/homePage/index')">{{ translations[language].home }}</a>
</p>
<!-- 产品与服务鼠标移入显示子菜单 -->
<p @mouseleave="sildeOut" @mouseenter="sildeIn(product_service)">
<a>{{ translations[language].ecosystem }}</a>
</p>
<!-- 供需广场 -->
<p :class="{ active: $route.path.includes('/supply') }">
<a @click="$router.push('/ncmatchHome/supplyAndDemandSquare')">{{ translations[language].supply }}</a>
</p>
<!-- 关于我们 -->
<p :class="{ active: $route.path.includes('/about') }" @mouseleave="sildeOut"
@click="$router.push('/homePage/about')">
@ -28,93 +32,21 @@
</nav>
</div>
<!-- 当homePath等于/ncmatchHome/index时的布局 -->
<div class="logo" v-else>
<!-- 登录状态下左侧显示用户信息下拉菜单 -->
<el-dropdown v-if="loginState" @visible-change="handleShow"
class="avatar-container left-menu-item hover-effect nick-name-style" style="margin-right: 0" trigger="click">
<div class="avatar-wrapper">
<!-- 显示用户名首字母头像和用户名 -->
<i
style="font-size: 18px; color: #262626;font-weight: 400;cursor: pointer;display: flex;justify-content: flex-start;align-items: center">
<div class="imgUser">{{ nick_name.charAt(0) }}</div>
{{ nick_name }}
<!-- 下拉箭头图标 -->
<i id="resverIcon" class="el-icon-arrow-up el-icon--right resverIcon"></i>
</i>
</div>
<!-- 用户信息下拉菜单内容 -->
<el-dropdown-menu slot="dropdown" style="width: 230px;font-size: 16px;" divided>
<!-- 用户信息头部 -->
<div style="display: flex;flex-direction: column;padding:15px 15px;background-color: #f0f2f5">
<span style="font-weight: bold;font-size: 20px;margin-bottom: 5px;color: #333333">{{ nick_name }}</span>
<span style="font-size: 12px;color:#666;display: flex;justify-content:flex-start;align-items: center"> ID:
<!-- 用户ID点击复制按钮可复制 -->
<span ref="contentToCopy">
{{
userId
}}
</span>
<!-- 复制按钮 -->
<svg @click="copyBtn" class="copy-btn" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"
width="12" height="12" style="fill: #1019ab;">
<path
d="M394.666667 106.666667h448a74.666667 74.666667 0 0 1 74.666666 74.666666v448a74.666667 74.666667 0 0 1-74.666666 74.666667H394.666667a74.666667 74.666667 0 0 1-74.666667-74.666667V181.333333a74.666667 74.666667 0 0 1 74.666667-74.666666z m0 64a10.666667 10.666667 0 0 0-10.666667 10.666666v448a10.666667 10.666667 0 0 0 10.666667 10.666667h448a10.666667 10.666667 0 0 0 10.666666-10.666667V181.333333a10.666667 10.666667 0 0 0-10.666666-10.666666H394.666667z m245.333333 597.333333a32 32 0 0 1 64 0v74.666667a74.666667 74.666667 0 0 1-74.666667 74.666666H181.333333a74.666667 74.666667 0 0 1-74.666666-74.666666V394.666667a74.666667 74.666667 0 0 1 74.666666-74.666667h74.666667a32 32 0 0 1 0 64h-74.666667a10.666667 10.666667 0 0 0-10.666666 10.666667v448a10.666667 10.666667 0 0 0 10.666666 10.666666h448a10.666667 10.666667 0 0 0 10.666667-10.666666v-74.666667z"
p-id="1521"></path>
</svg>
</span>
</div>
<!-- 分割线 -->
<el-divider style="margin: 0!important;"></el-divider>
<!-- 客户角色余额和充值按钮 -->
<div v-if="role.includes('客户')"
style="padding: 0 18px; width: 100%;height: 60px;display: flex;justify-content: space-between;align-items: center">
<span style="color:#666;display: block;font-size: 14px;" class="moneyNow"><span
style="display: block;margin-bottom: 5px">{{ translations[language].balance }}</span>{{
mybalance ? mybalance : initMybalance()
}} </span>
<el-button v-if="!isShowKbossCharge" type="primary" @click="$router.push('/kbossCharge')" plain
style="padding: 8px; ">
{{ translations[language].recharge }}
</el-button>
</div>
<!-- 个人中心菜单项 -->
<el-dropdown-item v-if="role.includes('客户')" @click.native="$router.push('/customer/customerInformation')">
<span style="display: block">{{ translations[language].personalCenter }}</span>
</el-dropdown-item>
<!-- 退出登录菜单项 -->
<el-dropdown-item @click.native="logout">
<span style="display: block">{{ translations[language].logout }}</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- 公司名称居中显示点击跳转首页 -->
<div class="company-name" @click="$router.push(homePath)"
style="cursor:pointer;font-size: 24px;font-weight: bold;color: #222F60;margin: 0 auto;">
{{ (logoInfoNew.home && logoInfoNew.home.orgName) || '' }}
</div>
</div>
<!-- 用户区域登录/注册按钮和用户下拉菜单 -->
<div class="user-area">
<!-- 搜索框 -->
<div class="search-box">
<i class="el-icon-search"></i>
<input type="text" :placeholder="translations[language].searchPlaceholder">
</div>
<!-- 中英互译 -->
<div class="language-toggle" @click="toggleLanguage">
<span class="language-text">{{ language === 'zh' ? 'English' : '中' }}</span>
<span class="iconfont icon-ditu_diqiu_o"></span>
<span class="language-text">{{ language === 'zh' ? 'English' : '中文' }}</span>
</div>
<!-- AI -->
<i class="el-icon-s-promotion functions" @click="handleGoLogin()"></i>
<i class="iconfont icon-AIzhushou functions" @click="handleAIClick"></i>
<!-- 客服 -->
<i class="el-icon-headset functions" @click="handleGoLogin()"></i>
<i class="iconfont icon-kefu functions" @click="handleServiceClick"></i>
<!-- 控制台按钮已登录 -->
<a @click="goB" v-if="loginState" class="login-btn">{{ translations[language].console }}</a>
<!-- 消息 -->
<i class="el-icon-message functions" @click="handleGoLogin()"></i>
<!-- 消息 - 修改这里点击时打开消息中心 -->
<i class="iconfont icon-xiaoxi functions" @click="handleMessageClick"></i>
<!-- 登录按钮未登录 -->
<a @click="$router.push({
path: '/login',
@ -126,14 +58,14 @@
<a @click="$router.push('/registrationPage')" v-if="!loginState" class="register-btn">{{
translations[language].register }}</a>
<!-- 用户下拉菜单非ncmatchHome页面且已登录 -->
<el-dropdown v-if="loginState && homePath !== '/ncmatchHome/index'" @visible-change="handleShow"
<!-- 用户下拉菜单已登录 -->
<el-dropdown v-if="loginState" @visible-change="handleShow"
class="avatar-container right-menu-item hover-effect nick-name-style" style="margin-right: 0" trigger="click">
<div class="avatar-wrapper">
<!-- 显示用户名首字母头像和用户名 -->
<i
style="font-size: 18px; color: #262626;font-weight: 400;cursor: pointer;display: flex;justify-content: flex-end;align-items: center">
<div class="imgUser"><img src="/static/img/user.png" alt=""></div>
<div class="imgUser"><img src="../../../../assets/image/user.png" alt=""></div>
{{ nick_name }}
<!-- 下拉箭头图标 -->
<i id="resverIcon" class="el-icon-arrow-up el-icon--right resverIcon"></i>
@ -226,7 +158,8 @@
v-if="secMenuData.length > 0 && secMenuData[0].thrMenu && secMenuData[0].thrMenu.length > 0 && secMenuData[0].thrMenu[0].thrTitle != null && secMenuData[0].secTitle !== secMenuData[0].thrMenu[0].thrTitle"
class="ge"></span>
<!-- 右侧面板最细粒度的菜单项 -->
<div class="panelRight" v-if="showPanelRightData.length > 0 && showPanelRightData[0] && showPanelRightData[0].value">
<div class="panelRight"
v-if="showPanelRightData.length > 0 && showPanelRightData[0] && showPanelRightData[0].value">
<ul class="leastMenu inBox">
<li class="clickItem" style="font-size: 14px!important;margin: 8px 0;cursor: pointer"
v-for="itemR in showPanelRightData[0].value" :key="itemR.id" @click="clickGo(itemR)">
@ -235,7 +168,7 @@
</li>
</ul>
</div>
<!-- 修复当没有数据时显示空状态 -->
<!-- 当没有数据时显示空状态 -->
<div class="panelRight" v-else>
<div style="text-align: center; color: #999; padding: 20px;">
{{ translations[language].noData }}
@ -243,6 +176,14 @@
</div>
</div>
</div>
<!-- 消息中心组件 -->
<message-center
ref="messageCenter"
:visible.sync="messageCenterVisible"
:userId="userId"
@unread-count-update="handleUnreadCountUpdate"
/>
</div>
</template>
@ -264,10 +205,17 @@ import { getHomePath } from '@/views/setting/tools'
//
import { languageStore, languageBus } from '@/utils/language'
//
import MessageCenter from '@/components/MessageCenter/MessageCenter.vue'
export default Vue.extend({
name: "TopBox",
components: {
MessageCenter
},
data() {
return {
messageCenterVisible: false, //
homePath: getHomePath(), //
isShowKbossCharge: false, // Kboss
role: sessionStorage.getItem("jueseNew") == "admin" ? [] : sessionStorage.getItem("jueseNew"), //
@ -285,10 +233,12 @@ export default Vue.extend({
product_service: [], //
language: 'zh', //
languageChangedHandler: null, //
messageCount: 0, //
translations: {
zh: {
home: '首页',
ecosystem: '产品与服务',
supply: '供需广场',
aboutUs: '关于我们',
balance: '余额',
recharge: '充值',
@ -299,6 +249,9 @@ export default Vue.extend({
login: '登录',
register: '立即注册',
noData: '暂无数据',
aiAssistant: 'AI助手',
customerService: '在线客服',
featureComingSoon: '功能即将上线,敬请期待!',
//
'云': '云',
'算': '算',
@ -400,6 +353,7 @@ export default Vue.extend({
en: {
home: 'Home',
ecosystem: 'Products & Services',
supply: 'Supply',
aboutUs: 'About Us',
balance: 'Balance',
recharge: 'Recharge',
@ -410,6 +364,9 @@ export default Vue.extend({
login: 'Login',
register: 'Register Now',
noData: 'No Data',
aiAssistant: 'AI Assistant',
customerService: 'Customer Service',
featureComingSoon: 'Feature coming soon, stay tuned!',
//
'云': 'Cloud',
'算': 'Computing',
@ -553,10 +510,6 @@ export default Vue.extend({
}
},
computed: {
// ncmatchHome
isNcmatchHome() {
return window.location.href.includes('ncmatchHome')
},
// Vuexgetters
...mapGetters(["sidebar", "avatar", "device"]),
// Vuexstate
@ -587,6 +540,45 @@ export default Vue.extend({
},
},
methods: {
// AI
handleAIClick() {
this.$message.info({
message: this.translations[this.language].featureComingSoon,
duration: 3000,
showClose: true
});
},
//
handleServiceClick() {
this.$message.info({
message: this.translations[this.language].featureComingSoon,
duration: 3000,
showClose: true
});
},
//
handleMessageClick() {
if (this.loginState) {
//
this.messageCenterVisible = true;
//
if (this.$refs.messageCenter) {
this.$refs.messageCenter.open();
}
} else {
//
this.handleGoLogin()
}
},
//
handleUnreadCountUpdate(count) {
this.messageCount = count;
},
//
initLanguage() {
// store
@ -713,7 +705,7 @@ export default Vue.extend({
}
},
//
//
edituserPassword() {
this.passwordDialog = true;
},
@ -748,6 +740,8 @@ export default Vue.extend({
//
async getUserInfo() {
if (!this.userId) return;
getUserInfoAPI({ id: this.userId }).then((res) => {
if (res.status) {
// this.nick_name = res.data[0].nick_name;
@ -961,7 +955,7 @@ export default Vue.extend({
this.showPanelRightData = this.threeData
},
// 使
//
networkData() {
return networkData
},
@ -1024,6 +1018,8 @@ export default Vue.extend({
this.$router.push({
path: '/login'
});
} else {
}
}
},
@ -1045,9 +1041,6 @@ export default Vue.extend({
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.08);
width: 100%;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
.container {
font-size: 18px;
@ -1057,7 +1050,7 @@ export default Vue.extend({
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
padding: 14px 20px;
}
.logo {
@ -1123,15 +1116,22 @@ export default Vue.extend({
.language-toggle {
cursor: pointer;
margin: 20px;
width: 60px;
margin-right: 20px;
// width: 60px;
text-align: center;
border-radius: 4px;
font-size: 14px;
text-decoration: none;
transition: all 0.3s;
color: #333;
z-index: 1001; /* 确保按钮在最上层 */
z-index: 1001;
display: flex;
align-items: center;
.icon-ditu_diqiu_o {
margin-right: 5px;
font-size: 24px !important;
}
&:hover {
color: #1E6FFF;
@ -1171,8 +1171,15 @@ export default Vue.extend({
}
}
.icon-xiaoxi {
font-size: 24px !important;
}
.functions {
padding-right: 20px;
font-size: 20px;
color: #000;
cursor: pointer;
&:hover {
color: #1E6FFF;
@ -1357,8 +1364,13 @@ export default Vue.extend({
width: 30px;
height: 30px;
border-radius: 50%;
background: #081020;
color: white;
margin-right: 8px;
img {
width: 40px;
height: 40px;
}
}
.company-name {
@ -1372,29 +1384,4 @@ export default Vue.extend({
color: #1E6FFF;
}
}
/* 当homePath等于/ncmatchHome/index时的特殊样式 */
.top-nav .container {
&.ncmatch-layout {
.logo {
flex: 1;
justify-content: space-between;
align-items: center;
}
.user-area {
justify-content: flex-end;
flex-shrink: 0;
}
}
}
/* 左侧用户头像样式 */
.left-menu-item {
.avatar-wrapper {
i {
justify-content: flex-start !important;
}
}
}
</style>

View File

@ -811,6 +811,7 @@ export default Vue.extend({
height: 100%;
overflow: auto !important;
min-width: 1500px;
}
.banner {

View File

@ -3,13 +3,9 @@
<div style="margin-top: 25px;">
<span style="margin-top: 100px;" class="title">
<span class="leftText">
算力供需
</span>
<span class="rightText"> 广场</span></span>
</div>

View File

@ -72,23 +72,36 @@
<div class="price card">
<div class="title">账户余额</div>
<div class="content">
<span class="balance">{{ initMybalance() }}</span>
<span class="balance">{{ this.mybalance }}</span>
<el-button size="mini" type="primary" @click="$router.push('/kbossCharge')">
立即充值
</el-button>
</div>
</div>
<div class="announcements card">
<div class="title">系统公告</div>
<ul class="announcement-list">
<li v-for="i in 3" :key="i">
<i class="el-icon-bell"></i>
<span>这是第{{ i }}条系统公告内容...</span>
<!-- 待办事项组件 -->
<div class="todos card">
<div class="title">待办事项</div>
<ul class="todo-list">
<li
v-for="(item, index) in todoList"
:key="index"
class="todo-item"
@click="handleTodoClick(item.name)"
>
<span class="todo-name">{{ item.name }}</span>
<span class="todo-count">{{ item.count }}</span>
</li>
</ul>
</div>
</div>
<!-- 消息中心弹窗 -->
<MessageCenter
ref="messageCenter"
:visible.sync="messageCenterVisible"
@unread-count-update="handleUnreadCountUpdate"
/>
</div>
</template>
@ -96,9 +109,15 @@
import Vue from 'vue'
import { mapState } from "vuex";
import { reqNewHomeResource, reqNewHomeResourceWarning, reqQuickNav } from "@/api/newHome";
import { editReachargelogAPI } from "@/api/finance/customerRechargeManagement";
import { getUnreadmsgAPI } from "@/api/login"; // API
import MessageCenter from '@/components/MessageCenter/MessageCenter.vue'; //
export default Vue.extend({
name: "mainPage",
components: {
MessageCenter
},
data() {
return {
tableData: [],
@ -109,10 +128,21 @@ export default Vue.extend({
email: ""
},
viewList: [],
navList: []
navList: [],
mybalance: 0, //
todoList: [
{ name: '待支付', count: 1 },
{ name: '待续费', count: 2 },
{ name: '处理中', count: 2 },
{ name: '站内信', count: 0 } // 0API
],
messageCenterVisible: false //
}
},
created() {
this.initMybalance();
this.getUnreadMsgCount(); //
},
mounted() {
reqQuickNav().then(res => {
this.navList = res.data
@ -146,9 +176,53 @@ export default Vue.extend({
}
})
},
initMybalance() {
return sessionStorage.getItem('mybalance') || '0.00'
async initMybalance() {
const res = await editReachargelogAPI()
if (res.status) {
this.mybalance = res.data
}
},
//
async getUnreadMsgCount() {
try {
const res = await getUnreadmsgAPI();
if (res.status) {
//
const messageItem = this.todoList.find(item => item.name === '站内信');
if (messageItem) {
messageItem.count = res.data || 0;
}
} else {
this.$message.error(res.msg || '获取未读消息失败');
}
} catch (error) {
console.error('获取未读消息失败:', error);
this.$message.error('获取未读消息失败');
}
},
//
handleTodoClick(todoName) {
//
if (todoName === '站内信') {
//
this.openMessageCenter();
} else {
//
this.$router.push('/product/overview');
}
},
//
openMessageCenter() {
this.messageCenterVisible = true;
},
//
handleUnreadCountUpdate(count) {
//
const messageItem = this.todoList.find(item => item.name === '站内信');
if (messageItem) {
messageItem.count = count || 0;
}
}
},
computed: {
...mapState({
@ -370,33 +444,44 @@ export default Vue.extend({
}
}
.announcements {
.announcement-list {
/* 待办事项样式 */
.todos {
.todo-list {
list-style: none;
padding: 0;
margin: 0;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
li {
padding: 10px 0;
border-bottom: 1px solid #eee;
.todo-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 15px;
border: 1px solid #ebeef5;
border-radius: 8px;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
&:last-child {
border-bottom: none;
&:hover {
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.2);
border-color: #409eff;
}
i {
color: #e6a23c;
margin-right: 10px;
flex-shrink: 0;
}
span {
.todo-name {
font-size: 14px;
color: #606266;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 8px;
}
.todo-count {
font-size: 24px;
font-weight: bold;
color: #409eff;
}
}
}
@ -440,9 +525,9 @@ export default Vue.extend({
.overView {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.todo-list {
grid-template-columns: repeat(2, 1fr);
}
}
</style>

View File

@ -113,7 +113,9 @@
</el-table>
</el-dialog>
</div>
<div>
<div class="table-box">
<el-table
v-loading="tableLoading"
:data="listData"
@ -212,6 +214,7 @@
</el-table>
<el-pagination
class="paginationStyle"
layout="prev, pager, next"
@current-change="handleCurrentChange"
:total="total">
@ -462,7 +465,7 @@ export default {
<style scoped lang="scss">
.mainBox {
padding-left: 5px;
height: 100%;
height: 90vh;
background: white;
.headerT {
@ -473,6 +476,8 @@ export default {
.headerL {
width: fit-content;
padding-top: 20px;
padding-left: 20px;
}
.headerR {
@ -508,4 +513,11 @@ export default {
//width: 24%;
}
}
.table-box{
padding: 20px;
}
.paginationStyle{
text-align: center;
margin: 20px;
}
</style>

View File

@ -5,7 +5,8 @@ align="center" header-align="center"
<div style="height: 50px;display: flex;justify-content: flex-start;align-items: center;padding-left: 10px">
<el-button type="primary" @click="hpcLdapAddVisible()" size="small">新增超算账号</el-button>
</div>
<el-table :data="tableDate" class="table_height" border height="calc(100vh - 150px)" v-loading="loading">
<div class="table-box">
<el-table :data="tableDate" class="table_height" border height="calc(100vh - 150px)" v-loading="loading">
<el-table-column align="center" header-align="center" prop="ldapuid" label="超算用户编码"></el-table-column>
<el-table-column align="center" header-align="center" prop="orgname" label="已绑定用户">
<template slot-scope="scope">
@ -28,6 +29,7 @@ align="center" header-align="center"
</template>
</el-table-column>
</el-table>
</div>
</div>
<!-- 新增超算账号弹窗 -->
@ -306,4 +308,8 @@ export default {
.table_height {
width: 100%;
}
.table-box{
padding:10px 20px;
}
</style>

View File

@ -9,7 +9,7 @@
:data="distributorList"
style="width: 100%"
:unique-opened="true"
height="calc(100vh - 130px)"
height="100%"
v-loading="loading"
highlight-current-row
:row-key="getRowKeys"
@ -2576,7 +2576,10 @@ export default {
}
.distributor_box {
height: calc(100vh - 130px);
height: calc(100vh - 160px);
padding: 20px;
background-color: #fff;
margin-top: 16px;
}
/* 展开详情样式优化 */