fix(缺陷管理): 修复创建修改缺陷时上传文件组件不展示的问题

This commit is contained in:
song-tianyang 2024-02-23 16:31:35 +08:00 committed by 刘瑞斌
parent aa162399c4
commit 03fde1b4a3
2 changed files with 19 additions and 18 deletions

View File

@ -22,7 +22,7 @@
:label="t('bugManagement.batchUpdate.attribute')" :label="t('bugManagement.batchUpdate.attribute')"
:rules="[{ required: true }]" :rules="[{ required: true }]"
> >
<a-select v-model:model-value="form.attribute" @change="handleArrtibuteChange"> <a-select v-model:model-value="form.attribute" @change="handleAttributeChange">
<a-optgroup :label="t('bugManagement.batchUpdate.systemFiled')"> <a-optgroup :label="t('bugManagement.batchUpdate.systemFiled')">
<a-option v-for="item in systemOptionList" :key="item.value" :value="item.value">{{ <a-option v-for="item in systemOptionList" :key="item.value" :value="item.value">{{
item.label item.label
@ -117,24 +117,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;
@ -191,7 +191,7 @@
}; };
const customFiledOption = ref<{ text: string; value: string }[]>([]); const customFiledOption = ref<{ text: string; value: string }[]>([]);
const handleArrtibuteChange = (value: SelectValue) => { const handleAttributeChange = (value: SelectValue) => {
form.value = []; form.value = [];
form.inputValue = ''; form.inputValue = '';
if (value === 'tags') { if (value === 'tags') {

View File

@ -73,7 +73,7 @@
</div> </div>
</a-form-item> </a-form-item>
<div class="mb-[8px] mt-[2px] text-[var(--color-text-4)]">{{ t('bugManagement.edit.fileExtra') }}</div> <div class="mb-[8px] mt-[2px] text-[var(--color-text-4)]">{{ t('bugManagement.edit.fileExtra') }}</div>
<FileList mode="static" :file-list="fileList"> <MsFileList ref="fileListRef" v-model:file-list="fileList" mode="static">
<template #actions="{ item }"> <template #actions="{ item }">
<!-- 本地文件 --> <!-- 本地文件 -->
<div v-if="item.local || item.status === 'init'" class="flex flex-nowrap"> <div v-if="item.local || item.status === 'init'" class="flex flex-nowrap">
@ -145,7 +145,7 @@
><icon-exclamation-circle-fill /> <span>{{ t('caseManagement.featureCase.fileIsUpdated') }}</span> ><icon-exclamation-circle-fill /> <span>{{ t('caseManagement.featureCase.fileIsUpdated') }}</span>
</span> </span>
</template> </template>
</FileList> </MsFileList>
</div> </div>
<a-divider class="ml-[16px]" direction="vertical" /> <a-divider class="ml-[16px]" direction="vertical" />
<div class="right mt-[16px] max-w-[433px] grow pr-[24px]"> <div class="right mt-[16px] max-w-[433px] grow pr-[24px]">
@ -197,6 +197,7 @@ import MsFormCreate from '@/components/pure/ms-form-create/ms-form-create.vue';
import {FormItem, FormRuleItem} from '@/components/pure/ms-form-create/types'; import {FormItem, FormRuleItem} from '@/components/pure/ms-form-create/types';
import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue'; import MsRichText from '@/components/pure/ms-rich-text/MsRichText.vue';
import MsTagsInput from '@/components/pure/ms-tags-input/index.vue'; import MsTagsInput from '@/components/pure/ms-tags-input/index.vue';
import MsFileList from "@/components/pure/ms-upload/fileList.vue";
import MsUpload from '@/components/pure/ms-upload/index.vue'; import MsUpload from '@/components/pure/ms-upload/index.vue';
import {MsFileItem} from '@/components/pure/ms-upload/types'; import {MsFileItem} from '@/components/pure/ms-upload/types';
import RelateFileDrawer from '@/components/business/ms-link-file/associatedFileDrawer.vue'; import RelateFileDrawer from '@/components/business/ms-link-file/associatedFileDrawer.vue';