fix(全局): bugFix

This commit is contained in:
baiqi 2024-06-25 10:20:33 +08:00 committed by 刘瑞斌
parent 1d041cf7c9
commit 3316efc003
12 changed files with 18 additions and 25 deletions

View File

@ -139,7 +139,6 @@
dataIndex: 'tags', dataIndex: 'tags',
isTag: true, isTag: true,
isStringTag: true, isStringTag: true,
width: 400,
showDrag: true, showDrag: true,
}, },
{ {

View File

@ -19,7 +19,7 @@
<span class="text-[var(--color-text-4)]">({{ element.childComments?.length }})</span> <span class="text-[var(--color-text-4)]">({{ element.childComments?.length }})</span>
</div> </div>
<div <div
v-if="hasAnyPermission(['PROJECT_BUG:READ+COMMENT', 'FUNCTIONAL_CASE:READ+COMMENT'])" v-if="hasAnyPermission(props.permissions)"
class="comment-btn hover:bg-[var(--color-bg-3)]" class="comment-btn hover:bg-[var(--color-bg-3)]"
:class="{ 'bg-[var(--color-text-n8)]': status === 'reply' }" :class="{ 'bg-[var(--color-text-n8)]': status === 'reply' }"
@click="replyClick" @click="replyClick"
@ -55,6 +55,7 @@
const props = defineProps<{ const props = defineProps<{
element: CommentItem; // element: CommentItem; //
mode: 'parent' | 'child'; // mode: 'parent' | 'child'; //
permissions: string[]; //
onReply?: () => void; // onReply?: () => void; //
onEdit?: () => void; // onEdit?: () => void; //
onDelete?: () => void; // onDelete?: () => void; //
@ -62,10 +63,7 @@
// //
const hasAuth = computed(() => { const hasAuth = computed(() => {
return ( return props.element.createUser === userStore.id && hasAnyPermission(props.permissions);
props.element.createUser === userStore.id &&
hasAnyPermission(['PROJECT_BUG:READ+COMMENT', 'FUNCTIONAL_CASE:READ+COMMENT'])
);
}); });
const status = defineModel<'normal' | 'edit' | 'reply' | 'delete'>('status', { default: 'normal' }); const status = defineModel<'normal' | 'edit' | 'reply' | 'delete'>('status', { default: 'normal' });

View File

@ -22,13 +22,16 @@ export default defineComponent({
}, },
uploadImage: { uploadImage: {
type: Function, type: Function,
// eslint-disable-next-line @typescript-eslint/no-empty-function
default: (file: File) => Promise<any>, default: (file: File) => Promise<any>,
}, },
previewUrl: { previewUrl: {
type: String as PropType<string>, type: String as PropType<string>,
default: '', default: '',
}, },
permissions: {
type: Array as PropType<string[]>,
default: () => [],
},
}, },
emits: { emits: {
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
@ -179,6 +182,7 @@ export default defineComponent({
{/* {expendedIds.value}--expendedIds */} {/* {expendedIds.value}--expendedIds */}
<Item <Item
mode={'parent'} mode={'parent'}
permissions={props.permissions}
onReply={() => handleReply(item)} onReply={() => handleReply(item)}
onEdit={() => handelEdit(item)} onEdit={() => handelEdit(item)}
onDelete={() => handleDelete(item)} onDelete={() => handleDelete(item)}

View File

@ -26,7 +26,7 @@
<a-radio value="Module">{{ t('project.fileManagement.module') }}</a-radio> <a-radio value="Module">{{ t('project.fileManagement.module') }}</a-radio>
<a-radio value="Storage">{{ t('project.fileManagement.storage') }}</a-radio> <a-radio value="Storage">{{ t('project.fileManagement.storage') }}</a-radio>
</a-radio-group> </a-radio-group>
<div class="mb-[8px] flex items-center gap-[8px]"> <div v-show="showType === 'Module'" class="mb-[8px] flex items-center gap-[8px]">
<a-input <a-input
v-model:model-value="moduleKeyword" v-model:model-value="moduleKeyword"
:placeholder="t('project.fileManagement.folderSearchPlaceholder')" :placeholder="t('project.fileManagement.folderSearchPlaceholder')"
@ -94,9 +94,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'; import { ref } from 'vue';
import { useVModel } from '@vueuse/core';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsDrawer from '@/components/pure/ms-drawer/index.vue'; import MsDrawer from '@/components/pure/ms-drawer/index.vue';
import MsSplitBox from '@/components/pure/ms-split-box/index.vue'; import MsSplitBox from '@/components/pure/ms-split-box/index.vue';
import FileTree from './fileTree.vue'; import FileTree from './fileTree.vue';
@ -155,10 +153,6 @@
const isExpandAll = ref(false); const isExpandAll = ref(false);
function changeExpand() {
isExpandAll.value = !isExpandAll.value;
}
type FileShowType = 'Module' | 'Storage'; type FileShowType = 'Module' | 'Storage';
const showType = ref<FileShowType>('Module'); const showType = ref<FileShowType>('Module');

View File

@ -20,6 +20,7 @@
v-if="activeComment === 'reviewComment' || activeComment === 'executiveComment'" v-if="activeComment === 'reviewComment' || activeComment === 'executiveComment'"
:review-comment-list="reviewCommentList" :review-comment-list="reviewCommentList"
:active-comment="activeComment" :active-comment="activeComment"
:permissions="['FUNCTIONAL_CASE:READ+COMMENT']"
/> />
<template v-else> <template v-else>
<MsComment <MsComment

View File

@ -624,7 +624,7 @@
(item) => ({ (item) => ({
...item, ...item,
operationTime: dayjs(item.operationTime).format('YYYY-MM-DD HH:mm:ss'), operationTime: dayjs(item.operationTime).format('YYYY-MM-DD HH:mm:ss'),
nextTime: dayjs(item.nextTime).format('YYYY-MM-DD HH:mm:ss'), nextTime: item.nextTime ? dayjs(item.nextTime).format('YYYY-MM-DD HH:mm:ss') : '-',
}) })
); );
function loadTaskList() { function loadTaskList() {

View File

@ -406,14 +406,14 @@
dataIndex: 'protocol', dataIndex: 'protocol',
slotName: 'protocol', slotName: 'protocol',
showTooltip: true, showTooltip: true,
width: 150, width: 80,
showDrag: true, showDrag: true,
}, },
{ {
title: 'apiTestManagement.apiType', title: 'apiTestManagement.apiType',
dataIndex: 'method', dataIndex: 'method',
slotName: 'method', slotName: 'method',
width: 140, width: 100,
showDrag: true, showDrag: true,
filterConfig: { filterConfig: {
options: [], options: [],
@ -458,7 +458,6 @@
dataIndex: 'tags', dataIndex: 'tags',
isTag: true, isTag: true,
isStringTag: true, isStringTag: true,
width: 400,
showDrag: true, showDrag: true,
}, },
{ {

View File

@ -409,7 +409,7 @@
dataIndex: 'protocol', dataIndex: 'protocol',
slotName: 'protocol', slotName: 'protocol',
showTooltip: true, showTooltip: true,
width: 150, width: 80,
showDrag: true, showDrag: true,
}, },
{ {
@ -420,7 +420,7 @@
options: casePriorityOptions, options: casePriorityOptions,
filterSlotName: FilterSlotNameEnum.CASE_MANAGEMENT_CASE_LEVEL, filterSlotName: FilterSlotNameEnum.CASE_MANAGEMENT_CASE_LEVEL,
}, },
width: 150, width: 100,
showDrag: true, showDrag: true,
}, },
{ {
@ -451,7 +451,6 @@
isTag: true, isTag: true,
isStringTag: true, isStringTag: true,
showDrag: true, showDrag: true,
width: 400,
}, },
{ {
title: 'case.lastReportStatus', title: 'case.lastReportStatus',

View File

@ -205,7 +205,7 @@
}); });
watch( watch(
() => props.formKey, () => [props.formKey, props.disabled],
() => { () => {
formModel.value = { formModel.value = {
matchAll: matchAll.value, matchAll: matchAll.value,

View File

@ -6,6 +6,7 @@
:preview-url="EditorPreviewFileUrl" :preview-url="EditorPreviewFileUrl"
:comment-list="commentList" :comment-list="commentList"
:upload-image="handleUploadImage" :upload-image="handleUploadImage"
:permissions="['PROJECT_BUG:READ+COMMENT']"
@delete="handleDelete" @delete="handleDelete"
@update-or-add="handleUpdate" @update-or-add="handleUpdate"
/> />

View File

@ -14,6 +14,7 @@
:upload-image="handleUploadImage" :upload-image="handleUploadImage"
:comment-list="commentList" :comment-list="commentList"
:preview-url="PreviewEditorImageUrl" :preview-url="PreviewEditorImageUrl"
:permissions="['FUNCTIONAL_CASE:READ+COMMENT']"
@delete="handleDelete" @delete="handleDelete"
@update-or-add="handleUpdateOrAdd" @update-or-add="handleUpdateOrAdd"
/> />

View File

@ -713,15 +713,12 @@
:deep(.param-input:not(.arco-input-focus, .arco-select-view-focus)) { :deep(.param-input:not(.arco-input-focus, .arco-select-view-focus)) {
&:not(:hover) { &:not(:hover) {
border-color: transparent !important; border-color: transparent !important;
.arco-input::placeholder { .arco-input::placeholder {
@apply invisible; @apply invisible;
} }
.arco-select-view-icon { .arco-select-view-icon {
@apply invisible; @apply invisible;
} }
.arco-select-view-value { .arco-select-view-value {
color: var(--color-text-1); color: var(--color-text-1);
} }