fix(缺陷管理): 修复缺陷管理创建和编辑时的交互,以及文件转存的正确报错提示
--bug=1036434 --user=宋天阳 【缺陷管理】创建缺陷,上传文件,多次转存文件,转存报错 https://www.tapd.cn/55049933/s/1471781
This commit is contained in:
parent
23c9430bf1
commit
45929cd675
|
@ -221,6 +221,8 @@ public class BugAttachmentService {
|
||||||
fileId = fileAssociationService.transferAndAssociation(association);
|
fileId = fileAssociationService.transferAndAssociation(association);
|
||||||
// 删除本地上传的附件
|
// 删除本地上传的附件
|
||||||
deleteLocalFile(request.getBugId(), null, request.getProjectId(), null, attachment.getId(), null);
|
deleteLocalFile(request.getBugId(), null, request.getProjectId(), null, attachment.getId(), null);
|
||||||
|
} catch (MSException e) {
|
||||||
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new MSException(Translator.get("file.transfer.failed"));
|
throw new MSException(Translator.get("file.transfer.failed"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,6 +194,7 @@
|
||||||
} from '@/api/modules/bug-management';
|
} from '@/api/modules/bug-management';
|
||||||
import { getModules, getModulesCount } from '@/api/modules/project-management/fileManagement';
|
import { getModules, getModulesCount } from '@/api/modules/project-management/fileManagement';
|
||||||
import { useI18n } from '@/hooks/useI18n';
|
import { useI18n } from '@/hooks/useI18n';
|
||||||
|
import useLeaveUnSaveTip from '@/hooks/useLeaveUnSaveTip';
|
||||||
import useVisit from '@/hooks/useVisit';
|
import useVisit from '@/hooks/useVisit';
|
||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { useAppStore } from '@/store';
|
import { useAppStore } from '@/store';
|
||||||
|
@ -215,9 +216,10 @@
|
||||||
import { convertToFileByBug } from './utils';
|
import { convertToFileByBug } from './utils';
|
||||||
|
|
||||||
defineOptions({ name: 'BugEditPage' });
|
defineOptions({ name: 'BugEditPage' });
|
||||||
|
const { setState } = useLeaveUnSaveTip();
|
||||||
|
setState(false);
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
interface TemplateOption {
|
interface TemplateOption {
|
||||||
label: string;
|
label: string;
|
||||||
value: string;
|
value: string;
|
||||||
|
@ -494,6 +496,7 @@
|
||||||
// 执行保存操作
|
// 执行保存操作
|
||||||
const res = await createOrUpdateBug({ request: tmpObj, fileList: localFiles as unknown as File[] });
|
const res = await createOrUpdateBug({ request: tmpObj, fileList: localFiles as unknown as File[] });
|
||||||
if (isEdit.value) {
|
if (isEdit.value) {
|
||||||
|
setState(true);
|
||||||
Message.success(t('common.updateSuccess'));
|
Message.success(t('common.updateSuccess'));
|
||||||
router.push({
|
router.push({
|
||||||
name: BugManagementRouteEnum.BUG_MANAGEMENT_INDEX,
|
name: BugManagementRouteEnum.BUG_MANAGEMENT_INDEX,
|
||||||
|
@ -501,6 +504,7 @@
|
||||||
} else {
|
} else {
|
||||||
Message.success(t('common.createSuccess'));
|
Message.success(t('common.createSuccess'));
|
||||||
if (isContinue) {
|
if (isContinue) {
|
||||||
|
setState(false);
|
||||||
// 如果是保存并继续创建
|
// 如果是保存并继续创建
|
||||||
const { templateId } = form.value;
|
const { templateId } = form.value;
|
||||||
// 用当前模板初始化自定义字段
|
// 用当前模板初始化自定义字段
|
||||||
|
@ -515,6 +519,7 @@
|
||||||
// 清空文件列表
|
// 清空文件列表
|
||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
} else {
|
} else {
|
||||||
|
setState(true);
|
||||||
// 否则跳转到成功页
|
// 否则跳转到成功页
|
||||||
if (getIsVisited()) {
|
if (getIsVisited()) {
|
||||||
router.push({
|
router.push({
|
||||||
|
|
Loading…
Reference in New Issue