This commit is contained in:
2024-05-07 17:32:46 +08:00
parent 57e9cc8201
commit 4dab2b9866
5 changed files with 170 additions and 137 deletions

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="zh-cmn-Hans">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/wxwx-logo.svg" /> <link rel="icon" type="image/svg+xml" href="/wxwx-logo.svg" />
@@ -8,36 +9,6 @@
<meta name="keywords" content="测试,管理,平台,测评,用例,FPGA,CPU,嵌入式,报告"> <meta name="keywords" content="测试,管理,平台,测评,用例,FPGA,CPU,嵌入式,报告">
<meta name="description" content="测试管理平台,服务内部,部分内容不对外开放"> <meta name="description" content="测试管理平台,服务内部,部分内容不对外开放">
<title>成都测试管理平台</title> <title>成都测试管理平台</title>
</head>
<body>
<noscript>
<strong>你的浏览器未开启javascript支持请开启后刷新页面访问</strong>
</noscript>
<div id="app" class="ma-ui">
<div class="app-loading">
<div class="app-loading__logo"><img src="/logo.svg" style="width: 170px;height: 200px;" /></div>
<div class="app-loading-text">
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<div class="app-loading-viewtext-container">
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
</div>
</div>
</div>
</div>
<style> <style>
html, html,
body, body,
@@ -47,6 +18,7 @@
transition-property: filter; transition-property: filter;
transition-duration: 1s; transition-duration: 1s;
} }
.app-loading { .app-loading {
position: absolute; position: absolute;
top: 0px; top: 0px;
@@ -94,32 +66,41 @@
.app-loading-viewtext-container span:nth-child(1) { .app-loading-viewtext-container span:nth-child(1) {
animation-delay: 0.2s; animation-delay: 0.2s;
} }
.app-loading-viewtext-container span:nth-child(2) { .app-loading-viewtext-container span:nth-child(2) {
animation-delay: 0.4s; animation-delay: 0.4s;
} }
.app-loading-viewtext-container span:nth-child(3) { .app-loading-viewtext-container span:nth-child(3) {
animation-delay: 0.6s; animation-delay: 0.6s;
} }
.app-loading-viewtext-container span:nth-child(4) { .app-loading-viewtext-container span:nth-child(4) {
animation-delay: 0.8s; animation-delay: 0.8s;
} }
.app-loading-viewtext-container span:nth-child(5) { .app-loading-viewtext-container span:nth-child(5) {
animation-delay: 1s; animation-delay: 1s;
} }
.app-loading-viewtext-container span:nth-child(6) { .app-loading-viewtext-container span:nth-child(6) {
animation-delay: 1.2s; animation-delay: 1.2s;
} }
.app-loading-viewtext-container span:nth-child(7) { .app-loading-viewtext-container span:nth-child(7) {
animation-delay: 1.4s; animation-delay: 1.4s;
} }
.app-loading-viewtext-container span:nth-child(8) { .app-loading-viewtext-container span:nth-child(8) {
animation-delay: 1.6s; animation-delay: 1.6s;
} }
.app-loading-viewtext-container span:nth-child(9) { .app-loading-viewtext-container span:nth-child(9) {
animation-delay: 1.8s; animation-delay: 1.8s;
} }
@keyframes loader { @keyframes loader {
0%, 0%,
75%, 75%,
100% { 100% {
@@ -134,6 +115,39 @@
} }
} }
</style> </style>
</head>
<body>
<noscript>
<strong>你的浏览器未开启javascript支持请开启后刷新页面访问</strong>
</noscript>
<div id="app" class="ma-ui">
<div class="app-loading">
<div class="app-loading__logo"><img src="/logo.svg" style="width: 170px;height: 200px;" /></div>
<div class="app-loading-text">
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<span class="app-loading-preloader"></span>
<div class="app-loading-viewtext-container">
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
<span class="app-loading-viewtext"></span>
</div>
</div>
</div>
</div>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>
</body> </body>
</html> </html>

View File

@@ -63,10 +63,13 @@ function createService() {
break break
case 401: case 401:
err("登录状态已过期,需要重新登录") err("登录状态已过期,需要重新登录")
// 清本地localStorage // 清本地localStorage
tool.local.clear() tool.local.clear()
// 移动到网站的根目录-这里不需要因为导航守卫可以返回login页面 // 移动到网站的根目录-这里不需要因为导航守卫可以返回login页面
if (error.response.data.data.code === 40001) { if (
error.response.data.data.code === 40001 ||
error.response.data.data.detail === "No active account found with the given credentials"
) {
} else { } else {
window.location.href = "/" window.location.href = "/"
} }

View File

@@ -613,22 +613,26 @@ const soDutColumn = ref([
{ {
title: "空行", title: "空行",
dataIndex: "black_line", dataIndex: "black_line",
formType: "input" formType: "input-number",
rules: [{ required: true, message: "空行数必填" }],
}, },
{ {
title: "纯注释", title: "纯注释",
dataIndex: "comment_line", dataIndex: "comment_line",
formType: "input" formType: "input-number",
rules: [{ required: true, message: "纯注释数必填" }],
}, },
{ {
title: "混合行", title: "混合行",
dataIndex: "mix_line", dataIndex: "mix_line",
formType: "input" formType: "input-number",
rules: [{ required: true, message: "混合行必填" }],
}, },
{ {
title: "纯代码", title: "纯代码",
dataIndex: "code_line", dataIndex: "code_line",
formType: "input" formType: "input-number",
rules: [{ required: true, message: "纯代码行必填" }],
} }
]) ])
</script> </script>

View File

@@ -61,8 +61,16 @@ function createService() {
break break
case 401: case 401:
err("登录状态已过期,需要重新登录") err("登录状态已过期,需要重新登录")
// 清楚本地localStorage
tool.local.clear() tool.local.clear()
window.location.href = "/login" // 移动到网站的根目录-这里不需要因为导航守卫可以返回login页面
if (
error.response.data.data.code === 40001 ||
error.response.data.data.detail === "No active account found with the given credentials"
) {
} else {
window.location.href = "/"
}
break break
case 403: case 403:
err("没有权限访问该资源") err("没有权限访问该资源")

View File

@@ -176,28 +176,32 @@ const crudColumns = ref([
hide: true, hide: true,
align: "center", align: "center",
dataIndex: "black_line", dataIndex: "black_line",
formType: "input-number" formType: "input-number",
commonRules: [{ required: true, message: "空行数必填" }],
}, },
{ {
title: "纯代码行", title: "纯代码行",
hide: true, hide: true,
align: "center", align: "center",
dataIndex: "code_line", dataIndex: "code_line",
formType: "input-number" formType: "input-number",
commonRules: [{ required: true, message: "纯代码行数必填" }],
}, },
{ {
title: "纯注释行", title: "纯注释行",
hide: true, hide: true,
align: "center", align: "center",
dataIndex: "comment_line", dataIndex: "comment_line",
formType: "input-number" formType: "input-number",
commonRules: [{ required: true, message: "纯注释行数必填" }],
}, },
{ {
title: "混合行", title: "混合行",
hide: true, hide: true,
align: "center", align: "center",
dataIndex: "mix_line", dataIndex: "mix_line",
formType: "input-number" formType: "input-number",
commonRules: [{ required: true, message: "混合行数必填" }],
}, },
{ {
title: "注释率 %", title: "注释率 %",