fix(全局): bug 修复
This commit is contained in:
parent
1fadd7b397
commit
42aba71826
|
@ -383,18 +383,20 @@
|
|||
saveFilePopoverVisible.value = true;
|
||||
}
|
||||
|
||||
function handleSaveFileFinish(fileId: string) {
|
||||
function handleSaveFileFinish(fileId: string, fileName: string) {
|
||||
if (savingFile.value) {
|
||||
inputFiles.value = inputFiles.value.map((e) => {
|
||||
if (e.value === savingFile.value?.fileId || e.value === savingFile.value?.uid) {
|
||||
// 被存储过的文件没有 uid,只有fileId;刚上传还未保存的文件只有 uid,没有fileId
|
||||
e.value = fileId;
|
||||
e.local = false;
|
||||
e.label = fileName;
|
||||
}
|
||||
return e;
|
||||
});
|
||||
savingFile.value.fileId = fileId;
|
||||
savingFile.value.local = false;
|
||||
savingFile.value.name = fileName;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -42,7 +42,12 @@
|
|||
</a-tree-select>
|
||||
<div class="flex items-center justify-end gap-[12px]">
|
||||
<a-button type="secondary" @click="handleSaveFileCancel">{{ t('common.cancel') }}</a-button>
|
||||
<a-button type="primary" :loading="saveLoading" @click="handleSaveFileConfirm">
|
||||
<a-button
|
||||
type="primary"
|
||||
:loading="saveLoading"
|
||||
:disabled="saveFileForm.name.trim() === ''"
|
||||
@click="handleSaveFileConfirm"
|
||||
>
|
||||
{{ t('common.confirm') }}
|
||||
</a-button>
|
||||
</div>
|
||||
|
@ -75,7 +80,7 @@
|
|||
}
|
||||
);
|
||||
const emit = defineEmits<{
|
||||
(e: 'finish', fileId: string): void;
|
||||
(e: 'finish', fileId: string, fileName: string): void;
|
||||
}>();
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
@ -86,7 +91,7 @@
|
|||
});
|
||||
const saveFileForm = ref({
|
||||
name: '',
|
||||
moduleId: '',
|
||||
moduleId: 'root',
|
||||
});
|
||||
const saveLoading = ref(false);
|
||||
const moduleTree = ref<ModuleTreeNode[]>([]);
|
||||
|
@ -115,6 +120,7 @@
|
|||
(visible) => {
|
||||
if (visible) {
|
||||
initModuleOptions();
|
||||
saveFileForm.value.name = props.savingFile?.name || '';
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -128,7 +134,7 @@
|
|||
function handleSaveFileCancel() {
|
||||
saveFileForm.value = {
|
||||
name: '',
|
||||
moduleId: '',
|
||||
moduleId: 'root',
|
||||
};
|
||||
saveFilePopoverVisible.value = false;
|
||||
}
|
||||
|
@ -147,8 +153,9 @@
|
|||
local: true,
|
||||
moduleId: saveFileForm.value.moduleId,
|
||||
fileName: saveFileForm.value.name,
|
||||
originalName: props.savingFile.name || '',
|
||||
});
|
||||
emit('finish', res);
|
||||
emit('finish', res, `${saveFileForm.value.name}.${props.savingFile.name?.split('.').pop()}`);
|
||||
Message.success(t('ms.add.attachment.saveAsSuccess'));
|
||||
handleSaveFileCancel();
|
||||
}
|
||||
|
|
|
@ -81,22 +81,22 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
||||
import MsSplitBox from '@/components/pure/ms-split-box/index.vue';
|
||||
import FileTree from './fileTree.vue';
|
||||
import LinkFileTable from './linkFileTable.vue';
|
||||
import StorageList from './storageList.vue';
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
|
||||
import MsSplitBox from '@/components/pure/ms-split-box/index.vue';
|
||||
import FileTree from './fileTree.vue';
|
||||
import LinkFileTable from './linkFileTable.vue';
|
||||
import StorageList from './storageList.vue';
|
||||
|
||||
import {useI18n} from '@/hooks/useI18n';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
||||
import type {AssociatedList} from '@/models/caseManagement/featureCase';
|
||||
import type {CommonList, ModuleTreeNode, TableQueryParams} from '@/models/common';
|
||||
import {FileListQueryParams, Repository} from '@/models/projectManagement/file';
|
||||
import type { AssociatedList } from '@/models/caseManagement/featureCase';
|
||||
import type { CommonList, ModuleTreeNode, TableQueryParams } from '@/models/common';
|
||||
import { FileListQueryParams, Repository } from '@/models/projectManagement/file';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
|
@ -178,9 +178,9 @@ const { t } = useI18n();
|
|||
modulesCount.value = await props.getCountRequest(params);
|
||||
myFileCount.value = modulesCount.value.my || 0;
|
||||
allFileCount.value = modulesCount.value.all;
|
||||
if(showType.value === 'Storage'){
|
||||
if (showType.value === 'Storage') {
|
||||
fileAllCountByStorage.value = modulesCount.value.git;
|
||||
}else {
|
||||
} else {
|
||||
fileAllCountByStorage.value = modulesCount.value.minio;
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
@ -111,8 +111,8 @@
|
|||
<div v-else class="ms-message-item">
|
||||
<MSAvatar v-if="item.avatar" :avatar="item.avatar" :word="item.userName" />
|
||||
<div class="ml-[8px] flex flex-col">
|
||||
<div class="flex items-center overflow-x-hidden">
|
||||
<a-badge v-if="item.status === 'UNREAD'" :count="9" dot :offset="[6, -2]" class="w-full">
|
||||
<div class="flex items-center">
|
||||
<a-badge v-if="item.status === 'UNREAD'" :count="9" dot :offset="[5, 2]">
|
||||
<a-tooltip :content="item.subject">
|
||||
<div class="one-line-text max-w-[300px] font-medium leading-[22px] text-[var(--color-text-1)]">
|
||||
{{ item.subject }}
|
||||
|
|
|
@ -21,7 +21,11 @@
|
|||
</template>
|
||||
<template #title="_props">
|
||||
<div class="flex w-full items-center gap-[4px] overflow-hidden">
|
||||
<div v-if="_props.children && _props.children.length > 0" @click.stop="handleExpand(_props)">
|
||||
<div
|
||||
v-if="_props.children && _props.children.length > 0"
|
||||
class="cursor-pointer"
|
||||
@click.stop="handleExpand(_props)"
|
||||
>
|
||||
<icon-caret-down v-if="_props.expanded" class="text-[var(--color-text-4)]" />
|
||||
<icon-caret-right v-else class="text-[var(--color-text-4)]" />
|
||||
</div>
|
||||
|
|
|
@ -93,4 +93,5 @@ export interface TransferFileParams {
|
|||
fileId: string;
|
||||
local: true;
|
||||
moduleId: string;
|
||||
originalName?: string;
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
:multiple="true"
|
||||
:fields="{
|
||||
id: 'fileId',
|
||||
name: 'fileName',
|
||||
name: 'fileAlias',
|
||||
}"
|
||||
:file-save-as-source-id="props.fileSaveAsSourceId"
|
||||
:file-save-as-api="props.fileSaveAsApi"
|
||||
|
@ -329,9 +329,9 @@
|
|||
class="ms-form-table-input"
|
||||
@change="() => addTableLine(rowIndex, columnConfig.addLineDisabled)"
|
||||
>
|
||||
<a-option v-for="item in columnConfig.options" :key="item.value" :value="item.value">{{
|
||||
t(item.label)
|
||||
}}</a-option>
|
||||
<a-option v-for="item in columnConfig.options" :key="item.value" :value="item.value">
|
||||
{{ t(item.label) }}
|
||||
</a-option>
|
||||
</a-select>
|
||||
</template>
|
||||
<!-- 匹配值 -->
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
() => innerVisible.value,
|
||||
(val) => {
|
||||
if (val && appStore.currentEnvConfig?.id) {
|
||||
selectedKey.value = props.selectedKey || '';
|
||||
initEnvironment(appStore.currentEnvConfig?.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
@adv-search="searchCase"
|
||||
@refresh="searchCase"
|
||||
>
|
||||
<template #right>
|
||||
<!-- <template #right>
|
||||
<div class="flex items-center">
|
||||
<a-radio-group v-model:model-value="showType" type="button" class="case-show-type">
|
||||
<a-radio value="list" class="show-type-icon p-[2px]">
|
||||
|
@ -21,7 +21,7 @@
|
|||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
</template>
|
||||
</template> -->
|
||||
</MsAdvanceFilter>
|
||||
</div>
|
||||
<ms-base-table
|
||||
|
@ -354,7 +354,7 @@
|
|||
const { t } = useI18n();
|
||||
const { openModal } = useModal();
|
||||
const keyword = ref('');
|
||||
const showType = ref<'list' | 'mind'>('list');
|
||||
// const showType = ref<'list' | 'mind'>('list');
|
||||
const filterRowCount = ref(0);
|
||||
const filterConfigList = ref<FilterFormItem[]>([]);
|
||||
const tableParams = ref<Record<string, any>>({});
|
||||
|
@ -483,6 +483,9 @@
|
|||
keyword: keyword.value,
|
||||
viewFlag: props.onlyMine,
|
||||
filter: { status: statusFilters.value, caseLevel: caseFilters.value },
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
total: propsRes.value.msPagination?.total,
|
||||
combine: filter
|
||||
? {
|
||||
...filter.combine,
|
||||
|
@ -493,9 +496,6 @@
|
|||
loadList();
|
||||
emit('init', {
|
||||
...tableParams.value,
|
||||
current: propsRes.value.msPagination?.current,
|
||||
pageSize: propsRes.value.msPagination?.pageSize,
|
||||
total: propsRes.value.msPagination?.total,
|
||||
moduleIds: [],
|
||||
});
|
||||
}
|
||||
|
@ -581,7 +581,7 @@
|
|||
try {
|
||||
disassociateLoading.value = true;
|
||||
await disassociateReviewCase(route.query.id as string, record.caseId);
|
||||
emit('refresh');
|
||||
emit('refresh', tableParams.value);
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
|
@ -642,7 +642,7 @@
|
|||
Message.success(t('common.updateSuccess'));
|
||||
resetSelector();
|
||||
loadList();
|
||||
emit('refresh');
|
||||
emit('refresh', tableParams.value);
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(error);
|
||||
|
@ -678,7 +678,7 @@
|
|||
Message.success(t('common.updateSuccess'));
|
||||
dialogVisible.value = false;
|
||||
resetSelector();
|
||||
emit('refresh');
|
||||
emit('refresh', tableParams.value);
|
||||
loadList();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
@ -737,7 +737,7 @@
|
|||
Message.success(t('caseManagement.caseReview.reviewSuccess'));
|
||||
dialogVisible.value = false;
|
||||
resetSelector();
|
||||
emit('refresh');
|
||||
emit('refresh', tableParams.value);
|
||||
loadList();
|
||||
} catch (error) {
|
||||
// eslint-disable-next-line no-console
|
||||
|
|
|
@ -385,7 +385,8 @@
|
|||
});
|
||||
}
|
||||
|
||||
function handleRefresh() {
|
||||
function handleRefresh(params: ReviewDetailCaseListQueryParams) {
|
||||
initModulesCount(params);
|
||||
initDetail();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue