新增设计需求、测试项、用例批量新增页面和功能
This commit is contained in:
@@ -2,30 +2,29 @@
|
||||
<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
|
||||
id="basic-table-design-normal"
|
||||
:options="crudOptions"
|
||||
:columns="crudColumns"
|
||||
ref="crudRef"
|
||||
:parent-key="route.query.key"
|
||||
>
|
||||
<ma-crud id="basic-table-design-normal" :options="crudOptions" :columns="crudColumns" ref="crudRef" :parent-key="route.query.key">
|
||||
<template #ident="{ record }">
|
||||
{{ showType(record) }}
|
||||
</template>
|
||||
<template #tableAfterButtons>
|
||||
<a-space>
|
||||
<a-button
|
||||
status="success"
|
||||
type="outline"
|
||||
@click="handleAddFileInputDemand"
|
||||
v-if="isXQ === 'XQ'"
|
||||
>
|
||||
<a-button status="success" type="outline" @click="handleAddFileInputDemand" v-if="isXQ === 'XQ'">
|
||||
<template #icon>
|
||||
<icon-plus />
|
||||
</template>
|
||||
上传需求规格说明快捷录入
|
||||
</a-button>
|
||||
<a-divider direction="vertical" type="double" />
|
||||
<a-dropdown-button type="primary" @click="handleBatchCreate">
|
||||
批量建设计需求
|
||||
<template #icon>
|
||||
<icon-down />
|
||||
</template>
|
||||
<template #content>
|
||||
<a-doption @click="handleBatchDemandCreate">批量创建测试项</a-doption>
|
||||
<a-doption @click="handleBatchCaseCreate">批量创建测试用例</a-doption>
|
||||
</template>
|
||||
</a-dropdown-button>
|
||||
<a-button type="outline" @click="handleReplaceClick">批量替换</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
@@ -49,6 +48,12 @@
|
||||
popup-key="design-normal"
|
||||
@replaceSuccess="replaceSuccessHandle"
|
||||
/>
|
||||
<!-- 批量新增设计需求组件 -->
|
||||
<BatchDesginCreate ref="batchCreateRef" :typeDict="demandTypeDict" @batchCreateFinish="refreshCrudTable" />
|
||||
<!-- 批量创建测试项组件 -->
|
||||
<BatchDemandCreate ref="batchCreateDemandRef" @batchDemandCreateComplete="refreshCrudTable" />
|
||||
<!-- 批量创建测试用例组件 -->
|
||||
<BatchCaseCreate ref="batchCreateCaseRef" @batchCaseCreateComplete="refreshCrudTable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -63,6 +68,9 @@ import designApi from "@/api/project/designDemand"
|
||||
import commonApi from "@/api/common"
|
||||
import FileInputModal from "./components/FileInputModal/index.vue"
|
||||
import ReplaceModel from "@/views/project/opeSets/components/DesignTable/ReplaceModal.vue"
|
||||
import BatchDesginCreate from "@/views/project/components/BatchDesignCreate"
|
||||
import BatchDemandCreate from "@/views/project/components/BatchDemandCreate/index.vue"
|
||||
import BatchCaseCreate from "@/views/project/components/BatchCaseCreate/index.vue"
|
||||
|
||||
const route = useRoute()
|
||||
const crudRef = ref()
|
||||
@@ -70,6 +78,10 @@ const projectId = ref(route.query.id)
|
||||
|
||||
// 5月28日新增功能:替换
|
||||
const replaceModal = ref()
|
||||
// 12月16日新增功能:批量添加
|
||||
const batchCreateRef = ref()
|
||||
const batchCreateDemandRef = ref()
|
||||
const batchCreateCaseRef = ref()
|
||||
|
||||
const handleReplaceClick = () => {
|
||||
replaceModal.value?.open(crudRef.value.getSelecteds) // 把获取选中行的函数给传递给替换组件
|
||||
@@ -116,6 +128,21 @@ const handleAddFileInputDemand = () => {
|
||||
fileInputRef.value.open()
|
||||
}
|
||||
|
||||
// ~~~批量新增设计需求弹窗~~~
|
||||
const handleBatchCreate = () => {
|
||||
batchCreateRef.value.open({})
|
||||
}
|
||||
|
||||
// ~~~批量新增测试项弹窗~~~
|
||||
const handleBatchDemandCreate = () => {
|
||||
batchCreateDemandRef.value.open({})
|
||||
}
|
||||
|
||||
// ~~~批量新增测试用例弹窗~~~
|
||||
const handleBatchCaseCreate = () => {
|
||||
batchCreateCaseRef.value.open({})
|
||||
}
|
||||
|
||||
const refreshCrudTable = () => {
|
||||
crudRef.value.refresh()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user