fix(项目管理): 修改报错阻断

This commit is contained in:
xinxin.wu 2024-01-03 10:08:31 +08:00 committed by Craftsman
parent 6682e53cca
commit f650d0c78d
7 changed files with 35 additions and 11 deletions

View File

@ -37,7 +37,6 @@ export default {
return {
onStart: (props: Record<string, any>) => {
debugger;
component = new VueRenderer(MentionList, {
props,
editor: props.editor,

View File

@ -176,6 +176,12 @@
class="mt-[16px] flex h-[32px] flex-row flex-nowrap items-center"
:class="{ 'justify-between': showBatchAction }"
>
<span v-if="!props.actionConfig && selectCurrent > 0" class="title text-[var(--color-text-2)]"
>{{ t('msTable.batch.selected', { count: selectCurrent }) }}
<a-button class="clear-btn ml-[12px] px-2" type="text" @click="emit('clearSelector')">{{
t('msTable.batch.clear')
}}</a-button></span
>
<div class="flex flex-grow">
<batch-action
v-if="showBatchAction"

View File

@ -216,7 +216,7 @@
});
onBeforeUnmount(() => {
resizeObserver.value.disconnect();
if (props.isAllScreen) resizeObserver.value.disconnect();
});
</script>

View File

@ -74,7 +74,7 @@
:user-group-options="userGroupOptions"
@success="loadList()"
/>
<MSBatchModal
<MsBatchModal
ref="batchModalRef"
v-model:visible="batchVisible"
:action="batchAction"
@ -94,7 +94,7 @@
import type { BatchActionParams, BatchActionQueryParams, MsTableColumn } from '@/components/pure/ms-table/type';
import useTable from '@/components/pure/ms-table/useTable';
import MsTagGroup from '@/components/pure/ms-tag/ms-tag-group.vue';
import MSBatchModal from '@/components/business/ms-batch-modal/index.vue';
import MsBatchModal from '@/components/business/ms-batch-modal/index.vue';
import MsRemoveButton from '@/components/business/ms-remove-button/MsRemoveButton.vue';
import AddMemberModal from './components/addMemberModal.vue';
@ -123,7 +123,7 @@
const { openModal } = useModal();
const appStore = useAppStore();
const tableStore = useTableStore();
const lastProjectId = computed(() => appStore.getCurrentProjectId);
const lastProjectId = computed(() => appStore.currentProjectId);
const columns: MsTableColumn = [
{
@ -266,7 +266,7 @@
const removeMember = async (record: ProjectMemberItem) => {
deleteLoading.value = true;
try {
if (lastProjectId && record.id) {
if (lastProjectId.value && record.id) {
await removeProjectMember(lastProjectId.value, record.id);
Message.success(t('project.member.deleteMemberSuccess'));
loadList();
@ -287,7 +287,7 @@
//
const addUserGroup = async (target: string[]) => {
const params = {
projectId: lastProjectId,
projectId: lastProjectId.value,
userIds: selectData.value,
roleIds: target,
};
@ -309,7 +309,7 @@
if (event.eventTag === 'batchAddUserGroup') {
batchVisible.value = true;
batchAction.value = event.eventTag;
batchModalRef.value.getTreeList(getProjectUserGroup, lastProjectId);
batchModalRef.value.getTreeList(getProjectUserGroup, lastProjectId.value);
}
};

View File

@ -48,7 +48,7 @@
<MsPopConfirm
type="error"
:title="t('system.orgTemplate.updateTip', { name: characterLimit(record.name) })"
:sub-title-tip="t('system.orgTemplate.updateDescription')"
:sub-title-tip="t('system.orgTemplate.updateDescription', { type: templateType })"
:ok-text="t('system.orgTemplate.confirm')"
@confirm="handleOk(record)"
>
@ -162,6 +162,17 @@
const currentOrd = computed(() => appStore.currentOrgId);
const currentProjectId = computed(() => appStore.currentProjectId);
const templateType = computed(() => {
switch (route.query.type) {
case 'API':
return t('system.orgTemplate.templateApi');
case 'BUG':
return t('system.orgTemplate.templateBug');
default:
return t('system.orgTemplate.templateCase');
}
});
const fieldColumns: MsTableColumn = [
{
title: 'system.orgTemplate.name',

View File

@ -62,6 +62,8 @@ export default {
'system.orgTemplate.optionsPlaceholder': 'Please enter options',
'system.orgTemplate.optionsIdPlaceholder': 'Please enter options ID',
'system.orgTemplate.optionsIdTip': 'The option ID cannot be empty',
'system.orgTemplate.updateTip': 'Are you sure to update {name}?',
'system.orgTemplate.updateDescription': 'After the update, use {type} will be an update of the field',
'system.orgTemplate.columnTemplateName': 'Template name',
'system.orgTemplate.copy': 'Copy',
'system.orgTemplate.defaultValue': 'Default value',
@ -170,4 +172,7 @@ export default {
'system.orgTemplate.modules': 'module',
'system.orgTemplate.tags': 'tags',
'system.orgTemplate.optionKeyValue': 'Option KEY value',
'system.orgTemplate.templateCase': 'Case',
'system.orgTemplate.templateApi': 'Api',
'system.orgTemplate.templateBug': 'Bug',
};

View File

@ -61,8 +61,8 @@ export default {
'system.orgTemplate.optionsPlaceholder': '请输入选项',
'system.orgTemplate.optionsIdPlaceholder': '请输入选项ID',
'system.orgTemplate.optionsIdTip': '选项ID不能为空',
'system.orgTemplate.updateTip': '确认更新 `{name}` 吗?',
'system.orgTemplate.updateDescription': '更新后,所使用该字段模版将一起修改',
'system.orgTemplate.updateTip': '确认更新 {name} 吗?',
'system.orgTemplate.updateDescription': '更新后,使用该字段的{type}将同步更新',
'system.orgTemplate.confirm': '确定',
'system.orgTemplate.columnTemplateName': '模版名称',
'system.orgTemplate.copy': '复制',
@ -161,4 +161,7 @@ export default {
'system.orgTemplate.modules': '模块',
'system.orgTemplate.tags': '标签',
'system.orgTemplate.optionKeyValue': '选项KEY值',
'system.orgTemplate.templateCase': '用例',
'system.orgTemplate.templateApi': '接口',
'system.orgTemplate.templateBug': '缺陷',
};