fix: 用例管理bug和富文本禁用
This commit is contained in:
parent
92cbcc1939
commit
316310716b
|
@ -122,7 +122,6 @@
|
|||
}
|
||||
const { height } = useWindowSize();
|
||||
appStore.innerHeight = height.value;
|
||||
userStore.getAuthentication();
|
||||
});
|
||||
/** 屏幕大小改变时重新赋值innerHeight */
|
||||
useEventListener(window, 'resize', () => {
|
||||
|
|
|
@ -153,11 +153,7 @@
|
|||
}"
|
||||
:max-length="1000"
|
||||
/>
|
||||
<a-radio-group
|
||||
v-else-if="item.type === FilterType.RADIO"
|
||||
v-model:model-value="item.value"
|
||||
v-bind="(item.radioProps as any)"
|
||||
>
|
||||
<a-radio-group v-else-if="item.type === FilterType.RADIO" v-model:model-value="item.value">
|
||||
<a-radio
|
||||
v-for="it of item.radioProps?.options || []"
|
||||
:key="it[item.radioProps?.valueKey || 'value']"
|
||||
|
|
|
@ -280,26 +280,26 @@
|
|||
Extension.create({
|
||||
addOptions() {
|
||||
return {
|
||||
getToolboxItems({ editors }: { editors: Editor }) {
|
||||
return [
|
||||
{
|
||||
priority: 0,
|
||||
component: markRaw(ToolboxItem),
|
||||
props: {
|
||||
editor,
|
||||
icon: markRaw(
|
||||
defineComponent({
|
||||
template: "<MsIcon type='icon-icon_link-copy_outlined' size='16' />",
|
||||
})
|
||||
),
|
||||
title: t('editor.attachment'),
|
||||
action: () => {
|
||||
attachmentSelectorModal.value = true;
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
// getToolboxItems({ editors }: { editors: Editor }) {
|
||||
// return [
|
||||
// {
|
||||
// priority: 0,
|
||||
// component: markRaw(ToolboxItem),
|
||||
// props: {
|
||||
// editor,
|
||||
// icon: markRaw(
|
||||
// defineComponent({
|
||||
// template: "<MsIcon type='icon-icon_link-copy_outlined' size='16' />",
|
||||
// })
|
||||
// ),
|
||||
// title: t('editor.attachment'),
|
||||
// action: () => {
|
||||
// attachmentSelectorModal.value = true;
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// ];
|
||||
// },
|
||||
getToolbarItems({ editors }: { editors: Editor }) {
|
||||
return {
|
||||
priority: 1000,
|
||||
|
|
|
@ -257,6 +257,13 @@ export const pathMap: PathMapItem[] = [
|
|||
permission: [],
|
||||
level: MENU_LEVEL[0],
|
||||
},
|
||||
{
|
||||
key: 'SETTING_SYSTEM_TASK_CENTER', // 系统设置-系统-任务中心
|
||||
locale: 'menu.projectManagement.taskCenter',
|
||||
route: RouteEnum.SETTING_SYSTEM_TASK_CENTER,
|
||||
permission: [],
|
||||
level: MENU_LEVEL[0],
|
||||
},
|
||||
{
|
||||
key: 'SETTING_SYSTEM_PLUGIN_MANAGEMENT', // 系统设置-系统-插件管理
|
||||
locale: 'menu.settings.system.pluginManager',
|
||||
|
@ -301,6 +308,13 @@ export const pathMap: PathMapItem[] = [
|
|||
permission: [],
|
||||
level: MENU_LEVEL[1],
|
||||
},
|
||||
{
|
||||
key: 'SETTING_ORGANIZATION_TASK_CENTER', // 系统设置-组织-任务中心
|
||||
locale: 'menu.projectManagement.taskCenter',
|
||||
route: RouteEnum.SETTING_ORGANIZATION_TASK_CENTER,
|
||||
permission: [],
|
||||
level: MENU_LEVEL[1],
|
||||
},
|
||||
{
|
||||
key: 'SETTING_ORGANIZATION_TEMPLATE', // 系统设置-组织-模板
|
||||
locale: 'menu.settings.organization.template',
|
||||
|
@ -508,6 +522,13 @@ export const pathMap: PathMapItem[] = [
|
|||
permission: [],
|
||||
level: MENU_LEVEL[2],
|
||||
},
|
||||
{
|
||||
key: 'PROJECT_MANAGEMENT_TASK_CENTER', // 项目管理-任务中心
|
||||
locale: 'menu.projectManagement.taskCenter',
|
||||
route: '',
|
||||
permission: [],
|
||||
level: MENU_LEVEL[2],
|
||||
},
|
||||
],
|
||||
},
|
||||
// 测试计划
|
||||
|
|
|
@ -481,6 +481,12 @@
|
|||
let currentDefaultValue;
|
||||
if (numberType.includes(item.type)) {
|
||||
currentDefaultValue = item.defaultValue * 1;
|
||||
} else if (
|
||||
multipleType.includes(item.type) &&
|
||||
Array.isArray(item.defaultValue) &&
|
||||
item.defaultValue.length === 0
|
||||
) {
|
||||
currentDefaultValue = item.defaultValue;
|
||||
} else if (multipleType.includes(item.type)) {
|
||||
currentDefaultValue = JSON.parse(item.defaultValue);
|
||||
} else {
|
||||
|
|
|
@ -252,6 +252,7 @@
|
|||
getCustomFieldsTable,
|
||||
updateCaseRequest,
|
||||
} from '@/api/modules/case-management/featureCase';
|
||||
import { getProjectMemberOptions } from '@/api/modules/project-management/projectMember';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useModal from '@/hooks/useModal';
|
||||
import { useAppStore, useTableStore } from '@/store';
|
||||
|
@ -412,6 +413,8 @@
|
|||
title: 'caseManagement.featureCase.tableColumnReviewResult',
|
||||
dataIndex: 'reviewStatus',
|
||||
slotName: 'reviewStatus',
|
||||
// TODO 待补充
|
||||
// titleSlotName: 'reviewStatusFilter',
|
||||
showInTable: true,
|
||||
width: 200,
|
||||
showDrag: true,
|
||||
|
@ -566,6 +569,8 @@
|
|||
const scrollWidth = ref<number>(3400);
|
||||
async function initFilter() {
|
||||
const result = await getCustomFieldsTable(currentProjectId.value);
|
||||
let memberOptions = await getProjectMemberOptions(appStore.currentProjectId, keyword.value);
|
||||
memberOptions = memberOptions.map((e) => ({ label: e.name, value: e.id }));
|
||||
filterConfigList.value = [
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnID',
|
||||
|
@ -597,11 +602,11 @@
|
|||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnCreateUser',
|
||||
dataIndex: 'createUser',
|
||||
dataIndex: 'createUserName',
|
||||
type: FilterType.SELECT,
|
||||
selectProps: {
|
||||
mode: 'static',
|
||||
options: [],
|
||||
options: memberOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -611,11 +616,11 @@
|
|||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnUpdateUser',
|
||||
dataIndex: 'updateUser',
|
||||
dataIndex: 'updateUserName',
|
||||
type: FilterType.SELECT,
|
||||
selectProps: {
|
||||
mode: 'static',
|
||||
options: [],
|
||||
options: memberOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -510,7 +510,22 @@
|
|||
// 处理自定义字段
|
||||
formRules.value = (customFields || []).map((item: any) => {
|
||||
const multipleType = ['MULTIPLE_SELECT', 'CHECKBOX', 'MULTIPLE_MEMBER', 'MULTIPLE_INPUT'];
|
||||
const currentDefaultValue = multipleType.includes(item.type) ? JSON.parse(item.defaultValue) : item.defaultValue;
|
||||
const numberType = ['INT', 'FLOAT'];
|
||||
|
||||
let currentDefaultValue;
|
||||
if (numberType.includes(item.type)) {
|
||||
currentDefaultValue = item.defaultValue * 1;
|
||||
} else if (
|
||||
multipleType.includes(item.type) &&
|
||||
Array.isArray(item.defaultValue) &&
|
||||
item.defaultValue.length === 0
|
||||
) {
|
||||
currentDefaultValue = item.defaultValue;
|
||||
} else if (multipleType.includes(item.type)) {
|
||||
currentDefaultValue = JSON.parse(item.defaultValue);
|
||||
} else {
|
||||
currentDefaultValue = item.defaultValue;
|
||||
}
|
||||
|
||||
return {
|
||||
...item,
|
||||
|
|
|
@ -171,6 +171,7 @@
|
|||
recoverRecycleCase,
|
||||
restoreCaseList,
|
||||
} from '@/api/modules/case-management/featureCase';
|
||||
import { getProjectMemberOptions } from '@/api/modules/project-management/projectMember';
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
import useModal from '@/hooks/useModal';
|
||||
import { useAppStore, useTableStore } from '@/store';
|
||||
|
@ -684,6 +685,8 @@
|
|||
|
||||
async function initFilter() {
|
||||
const result = await getCustomFieldsTable(currentProjectId.value);
|
||||
let memberOptions = await getProjectMemberOptions(appStore.currentProjectId, keyword.value);
|
||||
memberOptions = memberOptions.map((e) => ({ label: e.name, value: e.id }));
|
||||
filterConfigList.value = [
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnID',
|
||||
|
@ -715,11 +718,11 @@
|
|||
},
|
||||
{
|
||||
title: 'caseManagement.featureCase.tableColumnCreateUser',
|
||||
dataIndex: 'createUser',
|
||||
dataIndex: 'createUserName',
|
||||
type: FilterType.SELECT,
|
||||
selectProps: {
|
||||
mode: 'static',
|
||||
options: [],
|
||||
options: memberOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -733,7 +736,7 @@
|
|||
type: FilterType.SELECT,
|
||||
selectProps: {
|
||||
mode: 'static',
|
||||
options: [],
|
||||
options: memberOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ import { StatusType } from '@/enums/caseEnum';
|
|||
const { t } = useI18n();
|
||||
|
||||
// 获取列表对应的状态图标
|
||||
const statusIconMap = [
|
||||
export const statusIconMap = [
|
||||
{
|
||||
key: 'UN_REVIEWED',
|
||||
icon: StatusType.UN_REVIEWED,
|
||||
|
|
|
@ -17,17 +17,9 @@
|
|||
import banner from './components/banner.vue';
|
||||
import loginForm from './components/login-form.vue';
|
||||
|
||||
import { useUserStore } from '@/store';
|
||||
|
||||
const props = defineProps<{
|
||||
isPreview?: boolean;
|
||||
}>();
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
onMounted(() => {
|
||||
userStore.getAuthentication();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue