fix(用例管理): 批量编辑调整

This commit is contained in:
xinxin.wu 2024-02-21 14:36:13 +08:00 committed by 刘瑞斌
parent 39101f399a
commit d41dd5d159
3 changed files with 14 additions and 5 deletions

View File

@ -160,7 +160,7 @@ export function batchDeleteCase(data: BatchDeleteType) {
return MSR.post({ url: `${BatchDeleteCaseUrl}`, data }); return MSR.post({ url: `${BatchDeleteCaseUrl}`, data });
} }
// 批量编辑属性 // 批量编辑属性
export function batchEditAttrs(data: BatchEditCaseType) { export function batchEditAttrs(data: TableQueryParams) {
return MSR.post({ url: `${BatchEditCaseUrl}`, data }); return MSR.post({ url: `${BatchEditCaseUrl}`, data });
} }
// 批量移动到模块 // 批量移动到模块

View File

@ -38,7 +38,13 @@
<MsTagsInput v-model:modelValue="form.tags" allow-clear></MsTagsInput> <MsTagsInput v-model:modelValue="form.tags" allow-clear></MsTagsInput>
</a-form-item> </a-form-item>
<MsFormCreate ref="formCreateRef" v-model:api="fApi" v-model:form-item="formItem" :form-rule="formRules" /> <MsFormCreate
v-else
ref="formCreateRef"
v-model:api="fApi"
v-model:form-item="formItem"
:form-rule="formRules"
/>
</a-form> </a-form>
</div> </div>
</MsDialog> </MsDialog>
@ -59,6 +65,7 @@
import useAppStore from '@/store/modules/app'; import useAppStore from '@/store/modules/app';
import type { BatchEditCaseType, CustomAttributes } from '@/models/caseManagement/featureCase'; import type { BatchEditCaseType, CustomAttributes } from '@/models/caseManagement/featureCase';
import { TableQueryParams } from '@/models/common';
import Message from '@arco-design/web-vue/es/message'; import Message from '@arco-design/web-vue/es/message';
@ -165,8 +172,10 @@
customField.fieldId = item.field; customField.fieldId = item.field;
customField.value = Array.isArray(item.value) ? JSON.stringify(item.value) : item.value; customField.value = Array.isArray(item.value) ? JSON.stringify(item.value) : item.value;
}); });
const params: BatchEditCaseType = { const { selectedIds, selectAll } = props.batchParams;
selectIds: props.batchParams.selectedIds as string[], const params: TableQueryParams = {
selectedIds,
selectAll,
projectId: currentProjectId.value, projectId: currentProjectId.value,
append: enable as boolean, append: enable as boolean,
tags: form.value.tags, tags: form.value.tags,

View File

@ -1038,7 +1038,7 @@
}; };
function successHandler() { function successHandler() {
loadList(); initData();
emitTableParams(); emitTableParams();
resetSelector(); resetSelector();
} }