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