123
This commit is contained in:
219
cdTMP/src/views/project/case/index.vue
Normal file
219
cdTMP/src/views/project/case/index.vue
Normal file
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="ma-content-block lg:flex justify-between p-4">
|
||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||
<!-- CRUD组件 -->
|
||||
<ma-crud :options="crudOptions" :columns="crudColumns"></ma-crud>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
import { ref } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import problemApi from "@/api/project/problem"
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const roundNumber = route.query.key.split("-")[0]
|
||||
const designDemandNumber = route.query.key.split("-")[1]
|
||||
const testDemandNumber = route.query.key.split("-")[2]
|
||||
const caseNumber = route.query.key.split("-")[3]
|
||||
const crudOptions = ref({
|
||||
api: problemApi.getProblemList,
|
||||
parameters: {
|
||||
projectId: route.query.id,
|
||||
round: roundNumber,
|
||||
designDemand: designDemandNumber,
|
||||
testDemand: testDemandNumber,
|
||||
case: caseNumber
|
||||
},
|
||||
showIndex: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
add: { show: true },
|
||||
edit: { show: true },
|
||||
delete: { show: true },
|
||||
searchColNumber: 3,
|
||||
tablePagination: true,
|
||||
operationColumn: true,
|
||||
scroll:{ x: '100%', y: '100%' },
|
||||
formOption: {
|
||||
width: 1000
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
{
|
||||
title: "名称",
|
||||
align: "left",
|
||||
search: true,
|
||||
dataIndex: "name",
|
||||
commonRules: [{ required: true, message: "名称是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "标识",
|
||||
align: "center",
|
||||
width: 140,
|
||||
search: true,
|
||||
dataIndex: "ident",
|
||||
commonRules: [{ required: true, message: "标识是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "缺陷状态",
|
||||
align: "center",
|
||||
width: 80,
|
||||
search: true,
|
||||
dataIndex: "status",
|
||||
formType: "radio",
|
||||
addDefaultValue: "2",
|
||||
commonRules: [{ required: true, message: "缺陷状态是必填" }],
|
||||
dict: {
|
||||
name: "problemStatu",
|
||||
translation: true,
|
||||
props: { label: "title", value: "key" },
|
||||
tagColors: { 1: "green", 2: "blue", 3: "#FF7D00", 4: "red" }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "缺陷类型",
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: "type",
|
||||
search: true,
|
||||
addDefaultValue: "3",
|
||||
formType: "radio",
|
||||
commonRules: [{ required: true, message: "缺陷类型必选" }],
|
||||
dict: {
|
||||
name: "problemType",
|
||||
translation: true,
|
||||
props: { label: "title", value: "key" }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "缺陷等级",
|
||||
align: "center",
|
||||
width: 80,
|
||||
dataIndex: "grade",
|
||||
search: true,
|
||||
addDefaultValue: "1",
|
||||
formType: "radio",
|
||||
commonRules: [{ required: true, message: "缺陷等级必填" }],
|
||||
dict: {
|
||||
name: "problemGrade",
|
||||
translation: true,
|
||||
props: { label: "title", value: "key" }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "闭环方式",
|
||||
align: "center",
|
||||
width: 150,
|
||||
dataIndex: "closeMethod",
|
||||
addDefaultValue: "2",
|
||||
search: true,
|
||||
formType: "radio",
|
||||
dict: {
|
||||
name: "closeMethod",
|
||||
translation: true,
|
||||
props: { label: "title", value: "key" }
|
||||
},
|
||||
customRender: ({ record }) => {
|
||||
// 判断是否具有1:修改文档
|
||||
if (!record.closeMethod.hasOwnProperty("0")) {
|
||||
if (!record.closeMethod.hasOwnProperty("1")) {
|
||||
return <a-tag size="small" bordered color="magenta">还未闭环</a-tag>
|
||||
}
|
||||
}
|
||||
const tagObj = []
|
||||
for (let item in record.closeMethod) {
|
||||
if (item === "0") {
|
||||
tagObj.push(<a-tag size="small" bordered color="blue">修改文档</a-tag>)
|
||||
} else if (item === "1") {
|
||||
tagObj.push(<a-tag size="small" bordered color="green">修改程序</a-tag>)
|
||||
}
|
||||
}
|
||||
return <a-space size='mini'>{tagObj}</a-space>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
hide: true,
|
||||
search: true,
|
||||
dataIndex: "operation",
|
||||
formType: "editor"
|
||||
},
|
||||
{
|
||||
title: "期望结果",
|
||||
hide: true,
|
||||
dataIndex: "expect"
|
||||
},
|
||||
{
|
||||
title: "问题结果",
|
||||
hide: true,
|
||||
dataIndex: "result",
|
||||
formType: "editor"
|
||||
},
|
||||
{
|
||||
title: "修改建议",
|
||||
hide: true,
|
||||
dataIndex: "suggest"
|
||||
},
|
||||
{
|
||||
title: "提单人",
|
||||
dataIndex: "postPerson",
|
||||
search: true,
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "提单人必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'提单日期',
|
||||
hide: true,
|
||||
dataIndex:"postDate",
|
||||
formType:'date'
|
||||
},
|
||||
{
|
||||
title: "设计师上级",
|
||||
hide: true,
|
||||
dataIndex: "designerPerson",
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "提单人必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'提单日期',
|
||||
hide: true,
|
||||
dataIndex:"designDate",
|
||||
formType:'date'
|
||||
},
|
||||
{
|
||||
title: "验证人",
|
||||
hide: true,
|
||||
dataIndex: "verifyPerson",
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "提单人必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'验证日期',
|
||||
hide: true,
|
||||
dataIndex:"verifyDate",
|
||||
formType:'date'
|
||||
},
|
||||
{
|
||||
title: "撤销人",
|
||||
hide: true,
|
||||
dataIndex: "revokePerson",
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "提单人必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title:'撤销日期',
|
||||
hide: true,
|
||||
dataIndex:"revokeDate",
|
||||
formType:'date'
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
142
cdTMP/src/views/project/design-demand/index.vue
Normal file
142
cdTMP/src/views/project/design-demand/index.vue
Normal file
@@ -0,0 +1,142 @@
|
||||
<template>
|
||||
<div class="ma-content-block lg:flex justify-between p-4">
|
||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||
<!-- CRUD组件 -->
|
||||
<ma-crud :options="crudOptions" :columns="crudColumns"></ma-crud>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import testDemandApi from "@/api/project/testDemand"
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
// 根据传参获取key,分别为轮次、设计需求的key
|
||||
const roundNumber = route.query.key.split("-")[0]
|
||||
const designDemandNumber = route.query.key.split("-")[1]
|
||||
// crud组件
|
||||
const crudOptions = ref({
|
||||
api: testDemandApi.getTestDemandList,
|
||||
parameters: {
|
||||
projectId: route.query.id,
|
||||
round: roundNumber,
|
||||
designDemand: designDemandNumber
|
||||
},
|
||||
showIndex: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
add: { show: true },
|
||||
edit: { show: true, api: testDemandApi.editTestDemand },
|
||||
delete: { show: true },
|
||||
searchColNumber: 3,
|
||||
tablePagination: true,
|
||||
operationColumn: true,
|
||||
formOption: {
|
||||
width: 1200
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
{
|
||||
title: "ID",
|
||||
align: "center",
|
||||
width: 50,
|
||||
dataIndex: "id"
|
||||
},
|
||||
{
|
||||
title: "标识",
|
||||
dataIndex: "ident",
|
||||
align: "center",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "标识是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
width: 120,
|
||||
align: "center",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "名称是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "优先级",
|
||||
dataIndex: "priority",
|
||||
search: true,
|
||||
formType: "radio",
|
||||
align: "center",
|
||||
addDefaultValue: "1",
|
||||
dict: {
|
||||
name: "priority",
|
||||
props: { label: "title", value: "key" },
|
||||
translation: true,
|
||||
tagColors: { 1: "red", 2: "blue", 3: "green" }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "测试类型",
|
||||
dataIndex: "testType",
|
||||
search: true,
|
||||
align: "center",
|
||||
formType: "select",
|
||||
sortable: { sortDirections: ["ascend", "descend"] },
|
||||
addDefaultValue: "3",
|
||||
maxLength: 200,
|
||||
commonRules: [{ required: true, message: "测试类型必选" }],
|
||||
dict: { name: "testType", translation: true, props: { label: "title", value: "key" } },
|
||||
extra: "请保证测试类型选择正确"
|
||||
},
|
||||
{
|
||||
title: "充分条件",
|
||||
hide: true,
|
||||
addDefaultValue:"覆盖需求相关功能",
|
||||
dataIndex: "adequacy",
|
||||
commonRules: [{ required: true, message: "充分性描述必填" }]
|
||||
},
|
||||
{
|
||||
title: "终止条件",
|
||||
hide: true,
|
||||
dataIndex: "termination",
|
||||
formType: "textarea",
|
||||
showWordLimit: true,
|
||||
maxLength: 200,
|
||||
addDefaultValue:
|
||||
"1.测试正常终止:测试项分解的所有用例执行完毕,达到充分性要求,相关记录完整;\n2.测试异常终止:由于某些特殊原因导致该测试项分解的测试用例不能完全执行,无法执行的原因已记录",
|
||||
commonRules: [{ required: true, message: "前提条件必填" }]
|
||||
},
|
||||
{
|
||||
title: "前提条件",
|
||||
hide: true,
|
||||
addDefaultValue:"软件正常运行,外部接口通信正常",
|
||||
dataIndex: "premise",
|
||||
commonRules: [{ required: true, message: "前提条件必填" }]
|
||||
},
|
||||
{
|
||||
title: "测试方法",
|
||||
align: "center",
|
||||
dataIndex: "testMethod",
|
||||
commonRules: [{ required: true, message: "测试方法必填" }]
|
||||
},
|
||||
{
|
||||
title: "测试内容",
|
||||
hide: true,
|
||||
dataIndex:"testContent",
|
||||
commonRules: [{ required: true, message: "测试内容必填" }],
|
||||
formType: "children-form",
|
||||
type: "table",
|
||||
formList: [
|
||||
{
|
||||
title: "测试分解",
|
||||
dataIndex: "testXuQiu"
|
||||
},
|
||||
{
|
||||
title: "预期",
|
||||
dataIndex: "testYuQi"
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
81
cdTMP/src/views/project/round/index.vue
Normal file
81
cdTMP/src/views/project/round/index.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
<div class="ma-content-block lg:flex justify-between p-4">
|
||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||
<!-- CRUD组件 -->
|
||||
<ma-crud :options="crudOptions" :columns="crudColumns"></ma-crud>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import designDemandApi from "@/api/project/designDemand"
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
// crud组件
|
||||
const crudOptions = ref({
|
||||
api: designDemandApi.getDesignDemandList,
|
||||
parameters: {
|
||||
projectId: route.query.id,
|
||||
round: route.query.key
|
||||
},
|
||||
showIndex: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
add: { show: true },
|
||||
edit: { show: true },
|
||||
delete: { show: true },
|
||||
searchColNumber: 3,
|
||||
tablePagination: true,
|
||||
operationColumn: true,
|
||||
formOption: {
|
||||
width: 1200
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
{
|
||||
title: "ID",
|
||||
width: 50,
|
||||
dataIndex: "id",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "标识是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "标识",
|
||||
width: 120,
|
||||
dataIndex: "ident",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "标识是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "需求名称",
|
||||
width: 150,
|
||||
dataIndex: "name",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "需求名称是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "需求类型",
|
||||
width: 150,
|
||||
dataIndex: "demandType",
|
||||
formType: "radio",
|
||||
search: true,
|
||||
dict: { name: "demandType", props: { label: "title", value: "key" }, translation: true },
|
||||
commonRules: [{ required: true, message: "需求类型是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "需求描述",
|
||||
dataIndex: "description",
|
||||
width: 300,
|
||||
formType: "editor",
|
||||
height: 300
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
187
cdTMP/src/views/project/testDemand/index.vue
Normal file
187
cdTMP/src/views/project/testDemand/index.vue
Normal file
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div class="ma-content-block lg:flex justify-between p-4">
|
||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||
<!-- CRUD组件 -->
|
||||
<ma-crud :options="crudOptions" :columns="crudColumns"></ma-crud>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import caseApi from "@/api/project/case"
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const roundNumber = route.query.key.split("-")[0]
|
||||
const designDemandNumber = route.query.key.split("-")[1]
|
||||
const testDemandNumber = route.query.key.split("-")[2]
|
||||
// crud设置
|
||||
const crudOptions = ref({
|
||||
api: caseApi.getCaseList,
|
||||
parameters: {
|
||||
projectId: route.query.id,
|
||||
round: roundNumber,
|
||||
designDemand: designDemandNumber,
|
||||
testDemand: testDemandNumber
|
||||
},
|
||||
showIndex: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
add: { show: true },
|
||||
edit: { show: true },
|
||||
delete: { show: true },
|
||||
searchColNumber: 3,
|
||||
tablePagination: true,
|
||||
operationColumn: true,
|
||||
formOption: {
|
||||
width: 1200,
|
||||
layout: [
|
||||
{
|
||||
formType: "grid",
|
||||
cols: [
|
||||
{ span: 12, formList: [{ dataIndex: "ident" }] },
|
||||
{ span: 12, formList: [{ dataIndex: "name" }] }
|
||||
]
|
||||
},
|
||||
{
|
||||
formType: "card",
|
||||
customClass: ["ml-10", "mb-3", "py-0", "px-0"],
|
||||
title: "人员信息",
|
||||
formList: [
|
||||
{
|
||||
formType: "grid",
|
||||
cols: [
|
||||
{ span: 8, formList: [{ dataIndex: "designPerson" }] },
|
||||
{ span: 8, formList: [{ dataIndex: "testPerson" }] },
|
||||
{ span: 8, formList: [{ dataIndex: "monitorPerson" }] }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
{
|
||||
title: "ID",
|
||||
width: 50,
|
||||
align: "center",
|
||||
dataIndex: "id",
|
||||
fixed: "left"
|
||||
},
|
||||
{
|
||||
title: "标识",
|
||||
dataIndex: "ident",
|
||||
width: 140,
|
||||
align: "center",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "标识是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "名称",
|
||||
dataIndex: "name",
|
||||
width: 120,
|
||||
align: "center",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "名称是必填" }],
|
||||
validateTrigger: "blur"
|
||||
},
|
||||
{
|
||||
title: "设计人员",
|
||||
width: 80,
|
||||
dataIndex: "designPerson",
|
||||
align: "center",
|
||||
search: true,
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "设计人员必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title: "执行人员",
|
||||
dataIndex: "testPerson",
|
||||
width: 80,
|
||||
align: "center",
|
||||
search: true,
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "执行人员必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title: "审核人员",
|
||||
dataIndex: "monitorPerson",
|
||||
width: 80,
|
||||
align: "center",
|
||||
search: true,
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "审核人员必填" }],
|
||||
dict: { url: "system/user/index", translation: true, props: { label: "name", value: "name" } }
|
||||
},
|
||||
{
|
||||
title: "用例综述",
|
||||
align: "center",
|
||||
dataIndex: "summarize",
|
||||
search: true
|
||||
},
|
||||
{
|
||||
title: "用例初始化",
|
||||
dataIndex: "initialization",
|
||||
hide: true,
|
||||
addDefaultValue: "软件正常启动,正常登录进软件"
|
||||
},
|
||||
{
|
||||
title: "前提和约束",
|
||||
dataIndex: "premise",
|
||||
hide: true,
|
||||
addDefaultValue: "软件正常启动,各界面显示工作正常"
|
||||
},
|
||||
{
|
||||
title: "测试步骤",
|
||||
dataIndex: "testStep",
|
||||
hide: true,
|
||||
addDefaultValue: [
|
||||
{
|
||||
operation: "",
|
||||
expect: "",
|
||||
result: "",
|
||||
passed: "3",
|
||||
status: "3"
|
||||
}
|
||||
],
|
||||
formType: "children-form",
|
||||
type: "group",
|
||||
formList: [
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operation",
|
||||
formType: "editor"
|
||||
},
|
||||
{
|
||||
title: "预期",
|
||||
placeholder: "请输入预期结果",
|
||||
dataIndex: "expect"
|
||||
},
|
||||
{
|
||||
title: "结果",
|
||||
dataIndex: "result",
|
||||
|
||||
formType: "editor"
|
||||
},
|
||||
{
|
||||
title: "是否通过",
|
||||
dataIndex: "passed",
|
||||
formType: "radio",
|
||||
dict: { name: "passType", props: { label: "title", value: "key" } }
|
||||
},
|
||||
{
|
||||
title: "执行状态",
|
||||
dataIndex: "status",
|
||||
formType: "radio",
|
||||
dict: { name: "execType", props: { label: "title", value: "key" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
@@ -21,7 +21,6 @@ const previewRef = ref(null)
|
||||
// CRUD-OPTIONS
|
||||
const crudRef = ref()
|
||||
const crudOptions = ref({
|
||||
showIndex: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
api: projectApi.getPageList,
|
||||
add: { show: true },
|
||||
|
||||
Reference in New Issue
Block a user