style(缺陷管理): 缺陷管理文案优化
--bug=1036619 --user=宋天阳 【缺陷管理】批量编辑缺陷标签-页面名称错误&提交后未关闭弹框,建议和用例管理保持一致 https://www.tapd.cn/55049933/s/1470475
This commit is contained in:
parent
f424fd1a4b
commit
f463d479d4
|
@ -20,7 +20,7 @@
|
||||||
field="attribute"
|
field="attribute"
|
||||||
asterisk-position="end"
|
asterisk-position="end"
|
||||||
:label="t('bugManagement.batchUpdate.attribute')"
|
:label="t('bugManagement.batchUpdate.attribute')"
|
||||||
:rules="[{ required: true, message:t('bugManagement.batchUpdate.required.attribute') }]"
|
:rules="[{ required: true, message: t('bugManagement.batchUpdate.required.attribute') }]"
|
||||||
>
|
>
|
||||||
<a-select v-model:model-value="form.attribute" @change="handleAttributeChange">
|
<a-select v-model:model-value="form.attribute" @change="handleAttributeChange">
|
||||||
<a-optgroup :label="t('bugManagement.batchUpdate.systemFiled')">
|
<a-optgroup :label="t('bugManagement.batchUpdate.systemFiled')">
|
||||||
|
@ -28,12 +28,6 @@
|
||||||
item.label
|
item.label
|
||||||
}}</a-option>
|
}}</a-option>
|
||||||
</a-optgroup>
|
</a-optgroup>
|
||||||
<!-- V3.0 先不上自定义字段的批量更新 -->
|
|
||||||
<!-- <a-optgroup :label="t('bugManagement.batchUpdate.customFiled')">
|
|
||||||
<a-option v-for="item in customOptionList" :disabled="form.attribute === 'status'" :key="item.value" :value="item.value">{{
|
|
||||||
item.label
|
|
||||||
}}</a-option>
|
|
||||||
</a-optgroup> -->
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
|
@ -41,7 +35,7 @@
|
||||||
field="inputValue"
|
field="inputValue"
|
||||||
asterisk-position="end"
|
asterisk-position="end"
|
||||||
:label="t('bugManagement.batchUpdate.update')"
|
:label="t('bugManagement.batchUpdate.update')"
|
||||||
:rules="[{ required: true, message:t('bugManagement.batchUpdate.required.value') }]"
|
:rules="[{ required: true, message: t('bugManagement.batchUpdate.required.value') }]"
|
||||||
>
|
>
|
||||||
<template v-if="valueMode === 'input'">
|
<template v-if="valueMode === 'input'">
|
||||||
<a-input v-model:model-value="form.inputValue" :disabled="!form.attribute" />
|
<a-input v-model:model-value="form.inputValue" :disabled="!form.attribute" />
|
||||||
|
@ -63,7 +57,7 @@
|
||||||
asterisk-position="end"
|
asterisk-position="end"
|
||||||
:label="t('bugManagement.batchUpdate.update')"
|
:label="t('bugManagement.batchUpdate.update')"
|
||||||
validate-trigger="blur"
|
validate-trigger="blur"
|
||||||
:rules="[{ required: true, message:t('bugManagement.batchUpdate.required.value') }]"
|
:rules="[{ required: true, message: t('bugManagement.batchUpdate.required.value') }]"
|
||||||
>
|
>
|
||||||
<template v-if="valueMode === 'tags'">
|
<template v-if="valueMode === 'tags'">
|
||||||
<MsTagsInput v-model:modelValue="form.value" :disabled="!form.attribute"></MsTagsInput>
|
<MsTagsInput v-model:modelValue="form.value" :disabled="!form.attribute"></MsTagsInput>
|
||||||
|
@ -118,24 +112,24 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {computed, reactive, ref} from 'vue';
|
import { computed, reactive, ref } from 'vue';
|
||||||
import {type FormInstance, Message, type ValidatedError} from '@arco-design/web-vue';
|
import { type FormInstance, Message, type ValidatedError } from '@arco-design/web-vue';
|
||||||
|
|
||||||
import {BatchActionQueryParams} from '@/components/pure/ms-table/type';
|
import { BatchActionQueryParams } from '@/components/pure/ms-table/type';
|
||||||
import MsTagsInput from '@/components/pure/ms-tags-input/index.vue';
|
import MsTagsInput from '@/components/pure/ms-tags-input/index.vue';
|
||||||
import {MsUserSelector} from '@/components/business/ms-user-selector';
|
import { MsUserSelector } from '@/components/business/ms-user-selector';
|
||||||
import {UserRequestTypeEnum} from '@/components/business/ms-user-selector/utils';
|
import { UserRequestTypeEnum } from '@/components/business/ms-user-selector/utils';
|
||||||
|
|
||||||
import {updateBatchBug} from '@/api/modules/bug-management';
|
import { updateBatchBug } from '@/api/modules/bug-management';
|
||||||
import {useI18n} from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
import {useAppStore} from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
import {tableParamsToRequestParams} from '@/utils';
|
import { tableParamsToRequestParams } from '@/utils';
|
||||||
|
|
||||||
import type {BugBatchUpdateFiledType} from '@/models/bug-management';
|
import type { BugBatchUpdateFiledType } from '@/models/bug-management';
|
||||||
import {BugBatchUpdateFiledForm, BugEditCustomField} from '@/models/bug-management';
|
import { BugBatchUpdateFiledForm, BugEditCustomField } from '@/models/bug-management';
|
||||||
import {SelectValue} from '@/models/projectManagement/menuManagement';
|
import { SelectValue } from '@/models/projectManagement/menuManagement';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
selectParam: BatchActionQueryParams;
|
selectParam: BatchActionQueryParams;
|
||||||
|
@ -188,7 +182,7 @@ const { t } = useI18n();
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
formReset();
|
formReset();
|
||||||
currentVisible.value = false;
|
currentVisible.value = false;
|
||||||
showAppend.value=false;
|
showAppend.value = false;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
const customFiledOption = ref<{ text: string; value: string }[]>([]);
|
const customFiledOption = ref<{ text: string; value: string }[]>([]);
|
||||||
|
@ -235,6 +229,7 @@ const { t } = useI18n();
|
||||||
await updateBatchBug(tmpObj);
|
await updateBatchBug(tmpObj);
|
||||||
Message.success(t('common.updateSuccess'));
|
Message.success(t('common.updateSuccess'));
|
||||||
emit('submit');
|
emit('submit');
|
||||||
|
handleCancel();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
|
@ -85,8 +85,8 @@ export default {
|
||||||
systemFiled: '系统字段',
|
systemFiled: '系统字段',
|
||||||
customFiled: '自定义字段',
|
customFiled: '自定义字段',
|
||||||
append: '追加',
|
append: '追加',
|
||||||
openAppend: '开启: 追加字段',
|
openAppend: '开启: 追加标签',
|
||||||
closeAppend: '关闭: 覆盖原有字段',
|
closeAppend: '关闭: 覆盖原有标签',
|
||||||
handleUser: '处理人',
|
handleUser: '处理人',
|
||||||
tag: '标签',
|
tag: '标签',
|
||||||
required: {
|
required: {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
v-model:visible="isVisible"
|
v-model:visible="isVisible"
|
||||||
dialog-size="small"
|
dialog-size="small"
|
||||||
:title="t('caseManagement.featureCase.batchEdit', { number: props.batchParams.currentSelectCount })"
|
:title="t('caseManagement.featureCase.batchEdit', { number: props.batchParams.currentSelectCount })"
|
||||||
ok-text="common.confirm"
|
ok-text="common.update"
|
||||||
:confirm="confirmHandler"
|
:confirm="confirmHandler"
|
||||||
:close="closeHandler"
|
:close="closeHandler"
|
||||||
unmount-on-close
|
unmount-on-close
|
||||||
|
|
Loading…
Reference in New Issue