This commit is contained in:
2024-06-07 18:03:11 +08:00
parent 3e784abe55
commit b8df6f3403
14 changed files with 439 additions and 162 deletions

View File

@@ -1,15 +1,15 @@
<template>
<div>
<a-layout-footer class="flex items-center justify-center h-10 footer text-center"
>成都测试管理平台
</a-layout-footer>
</div>
<a-layout-footer class="flex items-center justify-center h-10 footer text-center">
<a-typography-title :heading="8"> 成都测试管理平台 </a-typography-title>
</a-layout-footer>
</template>
<script setup></script>
<style lang="less" scoped>
.footer {
border-top: 1px solid var(--color-border);
color: var(--color-text-2);
background-color: var(--color-bg-2);
}
</style>

View File

@@ -19,7 +19,11 @@
</a-space>
</div>
<div class="center-side flex items-center justify-center font-bold text-lg">
<template v-if="title"> 项目名称{{ $route.query.ident }}-{{ title }} </template>
<template v-if="title">
<a-typography-title :style="{ margin: 0, fontSize: '1.1rem', fontWeight: 'bold' }" :heading="4">
项目名称{{ $route.query.ident }}-{{ title }}
</a-typography-title>
</template>
<Menu v-if="topMenu"></Menu>
</div>
<ul class="right-side">
@@ -43,8 +47,8 @@
<!-- 这里有个下拉列表 -->
</li>
<li>
<a-tooltip content="切换主题-暂无">
<a-button class="nav-btn" type="outline" :shape="'circle'">
<a-tooltip content="切换主题">
<a-button @click="handleChangeTheme" class="nav-btn" type="outline" :shape="'circle'">
<template #icon>
<icon-moon-fill />
</template>
@@ -121,6 +125,12 @@ import Menu from "@/layout/components/menu.vue"
import { useRouter } from "vue-router"
const router = useRouter()
const appStore = useAppStore()
// 切换暗黑主题
const handleChangeTheme = () => {
document.body.hasAttribute("arco-theme")
? document.body.removeAttribute("arco-theme")
: document.body.setAttribute("arco-theme", "dark")
}
// title管理-默认在后台
const props = defineProps({
title: {

View File

@@ -1,5 +1,8 @@
<template>
<router-view v-slot="{ Component, route }" class="mx-2 my-2">
<template v-if="!Component">
<Empty class="full-empty" />
</template>
<transition name="ma-fade" mode="out-in" appear>
<!-- 这里主要在路由定义是否缓存页面 -->
<component :is="Component" v-if="route.meta.ignoreCache" :key="route.fullPath" />
@@ -13,6 +16,7 @@
<script setup>
import { computed, ref } from "vue"
import { useTabBarStore } from "@/store"
import Empty from "@/components/Empty/index.vue"
// 获取缓存列表
const tabBarStore = useTabBarStore()
const cacheList = computed(() => tabBarStore.getCacheList)
@@ -29,4 +33,8 @@ const refresh = () => {
defineExpose({ refresh })
</script>
<style lang="less" scoped></style>
<style lang="less" scoped>
.full-empty {
width: 79vw;
}
</style>

View File

@@ -96,7 +96,25 @@
<template v-if="props.node.level === '1'"> [被测件] </template>
<template v-if="props.node.level === '2'"> [] </template>
<template v-if="props.node.level === '3'"> [] </template>
<template v-if="props.node.level === '4'"> [] </template>
<template v-if="props.node.level === '4'">
<template v-if="props.node.isRelatedProblem">
<a-tooltip content="有问题单关联">
<button>[@]</button>
</a-tooltip>
</template>
<template v-else>
<template v-if="props.node.isNotPassed">
<a-tooltip content="该用例未通过,但是未关联问题单,请关联">
<button :style="{ color: 'red' }">[×]</button>
</a-tooltip>
</template>
<template v-else>
<a-tooltip content="该用例未执行或已通过,未关联问题单">
<button>[>]</button>
</a-tooltip>
</template>
</template>
</template>
</template>
</a-tree>
</div>
@@ -593,12 +611,32 @@ const roundColumn = ref([
dataIndex: "beginTime",
formType: "date",
placeholder: "请选择时间",
rules: [{ required: true, message: "开始时间必填" }]
extra: "尽量大于项目开始时间13天生成文档才符合要求",
rules: [
{ required: true, message: "开始时间必填" },
{
validator: (value, callback) => {
const projectBegin = route.query.beginTime
value <= projectBegin
? callback(
"不能早于项目开始时间由于还有前期测试设计阶段建议大于项目开始时间13天"
)
: null
}
}
]
},
{
title: "速度等级",
dataIndex: "speedGrade",
placeholder: "请填入速度等级"
},
{
title: "动态地点",
dataIndex: "location",
placeholder: "请填入测试地点",
extra: "该字段影响时间相关表格的地点",
rules: [{ required: true, message: "测试地点是必填的" }]
}
]
},
@@ -611,12 +649,36 @@ const roundColumn = ref([
dataIndex: "endTime",
formType: "date",
placeholder: "请选择时间",
rules: [{ required: true, message: "结束时间必填" }]
extra: "该字段决定《测试记录》封面时间",
rules: [
{ required: true, message: "结束时间必填" },
{
validator(value, errorCallback) {
let start = maFormModalRef.value.form.beginTime
value < start ? errorCallback("结束时间不能小于开始时间") : null
}
}
]
},
{
title: "封装",
dataIndex: "package",
placeholder: "请填入封装"
},
{
title: "质量等级",
dataIndex: "grade",
formType: "select",
dict: {
data: [
{ label: "军级", value: "1" },
{ label: "商业级", value: "2" },
{ label: "宇航级", value: "3" },
{ label: "工业级", value: "4" }
]
},
placeholder: "请填入质量等级",
rules: [{ required: true, message: "质量等级必填" }]
}
]
}
@@ -624,21 +686,7 @@ const roundColumn = ref([
}
]
},
{
title: "质量等级",
dataIndex: "grade",
formType: "radio",
dict: {
data: [
{ label: "军级", value: "1" },
{ label: "商业级", value: "2" },
{ label: "宇航级", value: "3" },
{ label: "工业级", value: "4" }
]
},
placeholder: "请填入质量等级",
rules: [{ required: true, message: "质量等级必填" }]
},
{
formType: "card",
title: "极端工况信息",