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',
isTag: true,
isStringTag: true,
width: 400,
showDrag: true,
},
{

View File

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

View File

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

View File

@ -26,7 +26,7 @@
<a-radio value="Module">{{ t('project.fileManagement.module') }}</a-radio>
<a-radio value="Storage">{{ t('project.fileManagement.storage') }}</a-radio>
</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
v-model:model-value="moduleKeyword"
:placeholder="t('project.fileManagement.folderSearchPlaceholder')"
@ -94,9 +94,7 @@
<script setup lang="ts">
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 MsSplitBox from '@/components/pure/ms-split-box/index.vue';
import FileTree from './fileTree.vue';
@ -155,10 +153,6 @@
const isExpandAll = ref(false);
function changeExpand() {
isExpandAll.value = !isExpandAll.value;
}
type FileShowType = 'Module' | 'Storage';
const showType = ref<FileShowType>('Module');

View File

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

View File

@ -624,7 +624,7 @@
(item) => ({
...item,
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() {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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