This commit is contained in:
2024-05-31 18:29:29 +08:00
parent 5a67d60937
commit 607dcde7b0
11 changed files with 853 additions and 459 deletions

View File

@@ -7,11 +7,11 @@
{{ showType(record) }}
</template>
<template #tableAfterButtons>
<a-button status="success" type="outline" @click="handleAddFileInputDemand">
<a-button status="success" type="outline" @click="handleAddFileInputDemand" v-if="isXQ === 'XQ'">
<template #icon>
<icon-plus />
</template>
上传需求快捷录入
上传需求规格说明快捷录入
</a-button>
</template>
</ma-crud>
@@ -24,6 +24,7 @@
import { ref, computed } from "vue"
import { useRoute, useRouter } from "vue-router"
import designDemandApi from "@/api/project/designDemand"
import dutApi from "@/api/project/dut"
import commonApi from "@/api/common"
import { useTreeDataStore } from "@/store"
import FileInputModal from "./components/FileInputModal/index.vue"
@@ -42,6 +43,14 @@ const demandTypeDict = ref([])
})
})()
// 5月31日更新获取当前dut的类型以判断是否显示“需求录入”的按钮
const isXQ = ref("")
async function isXQdemand() {
const res = await dutApi.getDutType({ key: route.query.key, project_id: projectId.value })
isXQ.value = res.data.dut_type
}
isXQdemand()
const showType = (record) => {
let len = demandTypeDict.value.data.length
for (let i = 0; i < len; i++) {
@@ -165,7 +174,7 @@ const crudColumns = ref([
// ~~~大功能打开ma-form-modal~~~
const fileInputRef = ref(null)
const handleAddFileInputDemand = () => {
fileInputRef.value.open();
fileInputRef.value.open()
}
</script>

View File

@@ -57,7 +57,6 @@ const crudOptions = ref({
let design_key = key_split[2]
let test_key = key_split[3]
let td = treeDataStore.treeData
console.log(route.query.key)
crudRef.value.crudFormRef.actionTitle = `${route.query.ident} >
${td[round_key].title} > ${td[round_key].children[dut_key].title} >
${td[round_key].children[dut_key].children[design_key].title} >
@@ -117,6 +116,21 @@ const crudOptions = ref({
]
}
]
},
{
formType: "grid",
cols: [{ span: 24, formList: [{ dataIndex: "summarize" }] }]
},
{
formType: "grid",
cols: [{ span: 24, formList: [{ dataIndex: "initialization" }] }]
},
{
formType: "grid",
cols: [
{ span: 12, formList: [{ dataIndex: "premise" }] },
{ span: 12, formList: [{ dataIndex: "exe_time" }] }
]
}
]
}
@@ -197,6 +211,12 @@ const crudColumns = ref([
hide: true,
addDefaultValue: "软件正常启动,各界面显示工作正常"
},
{
title: "执行时间",
dataIndex: "exe_time",
hide: true,
formType: "date",
},
{
title: "测试步骤",
dataIndex: "testStep",