feat(测试计划): 功能用例详情-缺陷快速创建页面增加处理人选项
This commit is contained in:
parent
858a6e223e
commit
92444ce347
|
@ -23,6 +23,22 @@
|
|||
>
|
||||
<a-input v-model="form.title" :max-length="255" />
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
field="handleUserId"
|
||||
:label="t('caseManagement.featureCase.updateUser')"
|
||||
:rules="[{ required: true, message: t('bugManagement.edit.handleManIsRequired') }]"
|
||||
asterisk-position="end"
|
||||
class="w-[240px]"
|
||||
>
|
||||
<MsSelect
|
||||
v-model:modelValue="form.handleUserId"
|
||||
mode="static"
|
||||
:placeholder="t('common.pleaseSelect')"
|
||||
:options="handleUserOptions"
|
||||
:search-keys="['label']"
|
||||
allow-search
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item :label="t('bugManagement.edit.content')">
|
||||
<MsRichText
|
||||
v-model:raw="form.description"
|
||||
|
@ -36,10 +52,11 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { FormInstance, Message, ValidatedError } from '@arco-design/web-vue';
|
||||
import { FormInstance, Message, SelectOptionData, ValidatedError } from '@arco-design/web-vue';
|
||||
|
||||
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
||||
import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue';
|
||||
import MsSelect from '@/components/business/ms-select/index';
|
||||
|
||||
import {
|
||||
createOrUpdateBug,
|
||||
|
@ -52,6 +69,7 @@
|
|||
import { useAppStore } from '@/store';
|
||||
|
||||
import { TemplateOption } from '@/models/common';
|
||||
import type { CustomField, FieldOptions } from '@/models/setting/template';
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
|
@ -106,6 +124,11 @@
|
|||
formRef.value?.validate(async (errors: undefined | Record<string, ValidatedError>) => {
|
||||
if (!errors) {
|
||||
drawerLoading.value = true;
|
||||
templateCustomFields.value.forEach((item: any) => {
|
||||
if (item.id === 'current_owner') {
|
||||
item.value = form.value.handleUserId;
|
||||
}
|
||||
});
|
||||
try {
|
||||
await createOrUpdateBug({
|
||||
request: { ...form.value, customFields: templateCustomFields.value, ...props.extraParams },
|
||||
|
@ -126,12 +149,21 @@
|
|||
});
|
||||
}
|
||||
|
||||
const handleUserOptions = ref<SelectOptionData[]>([]);
|
||||
async function initBugTemplate() {
|
||||
try {
|
||||
templateOptions.value = await getTemplateOption(appStore.currentProjectId);
|
||||
form.value.templateId = templateOptions.value.find((item) => item.enableDefault)?.id as string;
|
||||
defaultTemplateId.value = templateOptions.value.find((item) => item.enableDefault)?.id as string;
|
||||
const result = await getTemplateDetailInfo({ id: form.value.templateId, projectId: appStore.currentProjectId });
|
||||
handleUserOptions.value = result.customFields
|
||||
.find((customField: CustomField) => customField.fieldKey === 'handleUser')
|
||||
.options.map((item: FieldOptions) => {
|
||||
return {
|
||||
value: item.value,
|
||||
label: item.text,
|
||||
};
|
||||
});
|
||||
templateCustomFields.value = result.customFields.map((item: any) => {
|
||||
return {
|
||||
id: item.fieldId,
|
||||
|
@ -162,4 +194,8 @@
|
|||
);
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
<style scoped lang="less">
|
||||
:deep(.halo-rich-text-editor .ProseMirror) {
|
||||
min-height: 400px !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -109,7 +109,7 @@ export default {
|
|||
'testPlan.featureCase.batchDisassociateTipContent':
|
||||
' After cancellation, associate again, and the execution result is unexecuted',
|
||||
'testPlan.featureCase.startExecution': 'start Execution',
|
||||
'testPlan.featureCase.richTextDblclickPlaceholder': 'Double click for quick input',
|
||||
'testPlan.featureCase.richTextDblclickPlaceholder': 'Double click for full screen input',
|
||||
'testPlan.featureCase.autoNextTip1': 'Enable: After submitting the results, jump to the next case',
|
||||
'testPlan.featureCase.autoNextTip2': 'Close: After submitting the results, it is still in the current state',
|
||||
'testPlan.api.testSetRequired': 'The test set cannot be empty',
|
||||
|
|
|
@ -103,7 +103,7 @@ export default {
|
|||
'testPlan.featureCase.disassociateTipContent': '取消后,影响测试计划相关统计',
|
||||
'testPlan.featureCase.batchDisassociateTipContent': '取消后,再次关联,执行结果为:未执行',
|
||||
'testPlan.featureCase.startExecution': '开始执行',
|
||||
'testPlan.featureCase.richTextDblclickPlaceholder': '双击可快速输入',
|
||||
'testPlan.featureCase.richTextDblclickPlaceholder': '双击可全屏输入',
|
||||
'testPlan.featureCase.autoNextTip1': '开启:提交结果后,跳转至下一条用例',
|
||||
'testPlan.featureCase.autoNextTip2': '关闭:提交结果后,还在当前',
|
||||
'testPlan.api.testSetRequired': '测试集不能为空',
|
||||
|
|
Loading…
Reference in New Issue