From 2da15bd687179da18b8be43961c97f5202ab0ac8 Mon Sep 17 00:00:00 2001
From: ks3356143 <314298729@qq.com>
Date: Tue, 14 May 2024 20:02:19 +0800
Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8D=95=E7=BB=93=E6=9E=84?=
=?UTF-8?q?=E5=85=A8=E9=9D=A2=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cdTMP/src/api/generate/seitaiGenerate.js | 11 ++
cdTMP/src/api/generate/wtdGenerate.js | 14 ++
cdTMP/src/layout/project-layout.vue | 38 ++++++
.../src/layout/treeComponents/roundRight.vue | 65 +++++++++
.../project/case/components/ProblemChoose.vue | 126 +++++++++---------
cdTMP/src/views/project/case/index.vue | 93 ++++++-------
cdTMP/src/views/project/round/index.vue | 9 +-
.../src/views/testmanage/projmanage/index.vue | 15 +++
8 files changed, 253 insertions(+), 118 deletions(-)
create mode 100644 cdTMP/src/api/generate/wtdGenerate.js
create mode 100644 cdTMP/src/layout/treeComponents/roundRight.vue
diff --git a/cdTMP/src/api/generate/seitaiGenerate.js b/cdTMP/src/api/generate/seitaiGenerate.js
index a5856c3..159a24e 100644
--- a/cdTMP/src/api/generate/seitaiGenerate.js
+++ b/cdTMP/src/api/generate/seitaiGenerate.js
@@ -65,5 +65,16 @@ export default {
method: "get",
params
})
+ },
+ /**
+ * TODO:生成最终问题单
+ * @returns 返回是否正确生成问题单
+ */
+ createWtdDocument(params = {}) {
+ return request({
+ url: `/create/wtdDocument`,
+ method: "get",
+ params
+ })
}
}
diff --git a/cdTMP/src/api/generate/wtdGenerate.js b/cdTMP/src/api/generate/wtdGenerate.js
new file mode 100644
index 0000000..39aca97
--- /dev/null
+++ b/cdTMP/src/api/generate/wtdGenerate.js
@@ -0,0 +1,14 @@
+import { request } from "@/api/request"
+export default {
+ /**
+ * 生成问题单的多个表格
+ * @returns Promise(message)
+ */
+ createWtdTable(params = {}) {
+ return request({
+ url: `/generateWtd/create/problem`,
+ method: "get",
+ params
+ })
+ }
+}
diff --git a/cdTMP/src/layout/project-layout.vue b/cdTMP/src/layout/project-layout.vue
index 2a1f2e1..c52c3b4 100644
--- a/cdTMP/src/layout/project-layout.vue
+++ b/cdTMP/src/layout/project-layout.vue
@@ -205,6 +205,15 @@
content="选择移动/复制"
>
+
+
+
+
diff --git a/cdTMP/src/views/project/case/components/ProblemChoose.vue b/cdTMP/src/views/project/case/components/ProblemChoose.vue
index 0b4ce26..176ff98 100644
--- a/cdTMP/src/views/project/case/components/ProblemChoose.vue
+++ b/cdTMP/src/views/project/case/components/ProblemChoose.vue
@@ -1,6 +1,6 @@
-
- 关联添加问题单
+
+ {{ title }}
@@ -34,6 +34,17 @@ import problemApi from "@/api/project/problem"
import { Message } from "@arco-design/web-vue"
import { useRoute, useRouter } from "vue-router"
const route = useRoute()
+// 定义props
+const props = defineProps({
+ hasRelated: {
+ type: String,
+ default: "relatedProblem"
+ },
+ title: {
+ type: String,
+ default: "添加关联问题单"
+ }
+})
// 定义emits
const emits = defineEmits(["deleted", "relatedOrunrelated"])
@@ -70,8 +81,17 @@ const visible = ref(false)
// 定义open事件
const open = (row) => {
- crudRef.value.requestData() // 手动请求数据
- visible.value = true
+ if (props.hasRelated === "roundProblem") {
+ const columnService = crudRef.value.getColumnService()
+ columnService.get("related").setAttr("hide", true)
+ crudRef.value.requestParams = { round_key: row }
+ crudRef.value.requestData() // 这里要变化,请求的API变化
+ visible.value = true
+ }
+ if (props.hasRelated === "relatedProblem") {
+ crudRef.value.requestData() // 手动请求数据
+ visible.value = true
+ }
}
// crudOptions设置
const crudOptions = ref({
@@ -81,6 +101,7 @@ const crudOptions = ref({
rowSelection: { showCheckedAll: true },
operationWidth: 160,
operationColumnAlign: "center",
+ add: { show: true, api: problemApi.save, text: "新增无关联用例的问题单" },
edit: { show: true, api: problemApi.modalupdate },
delete: { show: true, api: problemApi.delete },
parameters: {
@@ -120,31 +141,33 @@ const crudOptions = ref({
]
},
{
- formType: "divider",
- title: "问题详情"
+ formType: "divider"
},
{
dataIndex: "operation"
},
- {
- dataIndex: "expect"
- },
{
dataIndex: "result"
},
{
- dataIndex: "rules"
+ title: "开发方回填",
+ formType: "divider"
},
{
- dataIndex: "suggest"
+ dataIndex: "analysis"
},
{
- formType: "divider",
- title: "解决问题"
+ dataIndex: "effect_scope"
},
{
dataIndex: "solve"
},
+ {
+ formType: "divider"
+ },
+ {
+ dataIndex: "verify_result"
+ },
{
formType: "divider",
title: "人员信息"
@@ -169,13 +192,6 @@ const crudOptions = ref({
{ span: 12, formList: [{ dataIndex: "verifyPerson" }] },
{ span: 12, formList: [{ dataIndex: "verifyDate" }] }
]
- },
- {
- formType: "grid",
- cols: [
- { span: 12, formList: [{ dataIndex: "revokePerson" }] },
- { span: 12, formList: [{ dataIndex: "revokeDate" }] }
- ]
}
]
},
@@ -297,7 +313,7 @@ const columns = ref([
}
},
{
- title: "问题操作",
+ title: "问题描述",
hide: true,
search: true,
dataIndex: "operation",
@@ -305,44 +321,47 @@ const columns = ref([
addDefaultValue: ""
},
{
- title: "期望结果",
- hide: true,
- dataIndex: "expect",
- addDefaultValue: ""
- },
- {
- title: "问题结果",
+ title: "问题影响",
hide: true,
dataIndex: "result",
formType: "editor",
addDefaultValue: ""
},
{
- title: "违反规则",
+ title: "原因分析",
hide: true,
- dataIndex: "rules",
+ dataIndex: "analysis",
+ formType: "editor",
addDefaultValue: ""
},
{
- title: "修改建议",
+ title: "影响域分析",
hide: true,
- dataIndex: "suggest",
+ dataIndex: "effect_scope",
+ formType: "editor",
addDefaultValue: ""
},
{
- title: "处理方式",
+ title: "改正措施",
hide: true,
dataIndex: "solve",
addDefaultValue: "",
formType: "textarea"
},
{
- title: "提单人",
+ title: "回归结果",
+ hide: true,
+ dataIndex: "verify_result",
+ addDefaultValue: "",
+ formType: "editor"
+ },
+ {
+ title: "测试人员",
dataIndex: "postPerson",
search: true,
hide: true,
formType: "select",
- commonRules: [{ required: true, message: "提单人必填" }],
+ commonRules: [{ required: true, message: "测试人员必填" }],
dict: { url: "system/user/list", translation: true, props: { label: "name", value: "name" } }
},
{
@@ -357,14 +376,14 @@ const columns = ref([
let tagObj
if (record.hang) {
tagObj = (
-
- 有关联用例
+
+ 悬挂
)
} else {
tagObj = (
-
- 悬挂
+
+ 有关联用例
)
}
@@ -380,50 +399,37 @@ const columns = ref([
editDisplay: false
},
{
- title: "提单日期",
+ title: "测试日期",
hide: true,
dataIndex: "postDate",
formType: "date"
},
{
- title: "设师上级",
+ title: "开发人员",
hide: true,
dataIndex: "designerPerson",
- commonRules: [{ required: true, message: "提单人必填" }]
+ formType: "input",
+ commonRules: [{ required: true, message: "开发人员必填" }]
},
{
- title: "确认日期",
+ title: "开发方日期",
hide: true,
dataIndex: "designDate",
formType: "date"
},
{
- title: "验证人",
+ title: "回归人员",
hide: true,
dataIndex: "verifyPerson",
formType: "select",
- commonRules: [{ required: true, message: "提单人必填" }],
+ commonRules: [{ required: true, message: "回归人" }],
dict: { url: "system/user/list", translation: true, props: { label: "name", value: "name" } }
},
{
- title: "验证日期",
+ title: "回归日期",
hide: true,
dataIndex: "verifyDate",
formType: "date"
- },
- {
- title: "撤销人",
- hide: true,
- dataIndex: "revokePerson",
- formType: "select",
- commonRules: [{ required: true, message: "提单人必填" }],
- dict: { url: "system/user/list", translation: true, props: { label: "name", value: "name" } }
- },
- {
- title: "撤销日期",
- hide: true,
- dataIndex: "revokeDate",
- formType: "date"
}
])
diff --git a/cdTMP/src/views/project/case/index.vue b/cdTMP/src/views/project/case/index.vue
index 51693fa..e3bd882 100644
--- a/cdTMP/src/views/project/case/index.vue
+++ b/cdTMP/src/views/project/case/index.vue
@@ -132,31 +132,33 @@ const crudOptions = ref({
]
},
{
- formType: "divider",
- title: "问题详情"
+ formType: "divider"
},
{
dataIndex: "operation"
},
- {
- dataIndex: "expect"
- },
{
dataIndex: "result"
},
- {
- dataIndex: "rules"
- },
- {
- dataIndex: "suggest"
- },
{
formType: "divider",
- title: "解决问题"
+ title: "开发方回填"
+ },
+ {
+ dataIndex: "analysis"
+ },
+ {
+ dataIndex: "effect_scope"
},
{
dataIndex: "solve"
},
+ {
+ formType: "divider"
+ },
+ {
+ dataIndex: "verify_result"
+ },
{
formType: "divider",
title: "人员信息"
@@ -182,13 +184,6 @@ const crudOptions = ref({
{ span: 12, formList: [{ dataIndex: "verifyDate" }] }
]
},
- {
- formType: "grid",
- cols: [
- { span: 12, formList: [{ dataIndex: "revokePerson" }] },
- { span: 12, formList: [{ dataIndex: "revokeDate" }] }
- ]
- }
]
}
})
@@ -303,7 +298,7 @@ const crudColumns = ref([
}
},
{
- title: "问题操作",
+ title: "问题描述",
hide: true,
search: true,
dataIndex: "operation",
@@ -311,65 +306,69 @@ const crudColumns = ref([
addDefaultValue: ""
},
{
- title: "期望结果",
- hide: true,
- dataIndex: "expect",
- addDefaultValue: ""
- },
- {
- title: "问题结果",
+ title: "问题影响",
hide: true,
dataIndex: "result",
formType: "editor",
addDefaultValue: ""
},
{
- title: "违反规则",
+ title: "原因分析",
hide: true,
- dataIndex: "rules",
+ dataIndex: "analysis",
+ formType: "editor",
addDefaultValue: ""
},
{
- title: "修改建议",
+ title: "影响域分析",
hide: true,
- dataIndex: "suggest",
+ dataIndex: "effect_scope",
+ formType: "editor",
addDefaultValue: ""
},
{
- title: "处理方式",
+ title: "改正措施",
hide: true,
dataIndex: "solve",
addDefaultValue: "",
formType: "textarea"
},
{
- title: "提单人",
+ title: "回归结果",
+ hide: true,
+ dataIndex: "verify_result",
+ addDefaultValue: "",
+ formType: "editor"
+ },
+ {
+ title: "测试人员",
dataIndex: "postPerson",
search: true,
formType: "select",
- commonRules: [{ required: true, message: "提单人必填" }],
+ commonRules: [{ required: true, message: "测试人员必填" }],
dict: { url: "system/user/list", translation: true, props: { label: "name", value: "name" } }
},
{
- title: "提单日期",
+ title: "测试日期",
hide: true,
dataIndex: "postDate",
formType: "date"
},
{
- title: "设师上级",
+ title: "开发人员",
hide: true,
dataIndex: "designerPerson",
- commonRules: [{ required: true, message: "提单人必填" }]
+ formType: "input",
+ commonRules: [{ required: true, message: "开发人员必填" }],
},
{
- title: "确认日期",
+ title: "开发方日期",
hide: true,
dataIndex: "designDate",
formType: "date"
},
{
- title: "验证人",
+ title: "回归人员",
hide: true,
dataIndex: "verifyPerson",
formType: "select",
@@ -377,25 +376,11 @@ const crudColumns = ref([
dict: { url: "system/user/list", translation: true, props: { label: "name", value: "name" } }
},
{
- title: "验证日期",
+ title: "回归日期",
hide: true,
dataIndex: "verifyDate",
formType: "date"
},
- {
- title: "撤销人",
- hide: true,
- dataIndex: "revokePerson",
- formType: "select",
- commonRules: [{ required: true, message: "提单人必填" }],
- dict: { url: "system/user/list", translation: true, props: { label: "name", value: "name" } }
- },
- {
- title: "撤销日期",
- hide: true,
- dataIndex: "revokeDate",
- formType: "date"
- }
])
diff --git a/cdTMP/src/views/project/round/index.vue b/cdTMP/src/views/project/round/index.vue
index 0b6d5fb..86ec3a7 100644
--- a/cdTMP/src/views/project/round/index.vue
+++ b/cdTMP/src/views/project/round/index.vue
@@ -63,6 +63,7 @@ const crudOptions = ref({
},
operationWidth: 500,
showIndex: false,
+ showTools: false,
rowSelection: { showCheckedAll: true },
searchColNumber: 3,
tablePagination: false,
@@ -180,7 +181,7 @@ const crudColumns = ref([
align: "center",
dataIndex: "black_line",
formType: "input-number",
- commonRules: [{ required: true, message: "空行数必填" }],
+ commonRules: [{ required: true, message: "空行数必填" }]
},
{
title: "纯代码行",
@@ -188,7 +189,7 @@ const crudColumns = ref([
align: "center",
dataIndex: "code_line",
formType: "input-number",
- commonRules: [{ required: true, message: "纯代码行数必填" }],
+ commonRules: [{ required: true, message: "纯代码行数必填" }]
},
{
title: "纯注释行",
@@ -196,7 +197,7 @@ const crudColumns = ref([
align: "center",
dataIndex: "comment_line",
formType: "input-number",
- commonRules: [{ required: true, message: "纯注释行数必填" }],
+ commonRules: [{ required: true, message: "纯注释行数必填" }]
},
{
title: "混合行",
@@ -204,7 +205,7 @@ const crudColumns = ref([
align: "center",
dataIndex: "mix_line",
formType: "input-number",
- commonRules: [{ required: true, message: "混合行数必填" }],
+ commonRules: [{ required: true, message: "混合行数必填" }]
},
{
title: "注释率 %",
diff --git a/cdTMP/src/views/testmanage/projmanage/index.vue b/cdTMP/src/views/testmanage/projmanage/index.vue
index d2b6340..4f7df08 100644
--- a/cdTMP/src/views/testmanage/projmanage/index.vue
+++ b/cdTMP/src/views/testmanage/projmanage/index.vue
@@ -18,6 +18,7 @@
报告二级文档
回归说明二级文档
回归记录二级文档
+ 问题单二级文档
[测试]生成最后大纲
@@ -36,6 +37,9 @@
[测试]回归测试记录
+
+ [测试]生成问题单
+
进入工作区
@@ -64,6 +68,7 @@ import jlGenerateApi from "@/api/generate/jlGenerate"
import bgGenerateApi from "@/api/generate/bgGenerate"
import hsmGenerateApi from "@/api/generate/hsmGenerate"
import hjlGenerateApi from "@/api/generate/hjlGenerate"
+import wtdGenerateApi from "@/api/generate/wtdGenerate"
import { Message } from "@arco-design/web-vue"
import Progress from "./cpns/progress.vue"
import hoosk from "@/views/testmanage/projmanage/hooks.js"
@@ -118,6 +123,11 @@ const createSeitaiHjl = async (record) => {
ptext.value = "回归测试记录"
hoosk.create_entire_doc(visible, isComplete, seitaiGenerateApi.createHjlDocument, record.id)
}
+// ~~~~~~~~问题单~~~~~~~~
+const createSeitaiWtd = async (record) => {
+ ptext.value = "问题单"
+ hoosk.create_entire_doc(visible, isComplete, seitaiGenerateApi.createWtdDocument, record.id)
+}
// 记录生成二级文档
const createJLItem = async (record) => {
@@ -232,6 +242,11 @@ const createHjlItem = async (record) => {
const st = await hjlGenerateApi.createCaseinfo({ id: record.id })
Message.success(st.message)
}
+// 问题单二级文档
+const createWtdItem = async (record) => {
+ const st = await wtdGenerateApi.createWtdTable({ id: record.id })
+ Message.success(st.message)
+}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~