fix(系统设置): 项目管理bug修改
This commit is contained in:
parent
7203985634
commit
e94beb9fbd
|
@ -26,7 +26,6 @@
|
|||
:width="item.width"
|
||||
:align="item.align"
|
||||
:fixed="item.fixed"
|
||||
:ellipsis="item.ellipsis"
|
||||
:sortable="item.sortable"
|
||||
:filterable="item.filterable"
|
||||
:cell-class="item.cellClass"
|
||||
|
@ -112,6 +111,33 @@
|
|||
</template>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<template v-else-if="item.ellipsis">
|
||||
<a-input
|
||||
v-if="
|
||||
editActiveKey === `${item.dataIndex}${rowIndex}` &&
|
||||
item.editable &&
|
||||
item.editType === ColumnEditTypeEnum.INPUT
|
||||
"
|
||||
ref="currentInputRef"
|
||||
v-model="record[item.dataIndex as string]"
|
||||
@blur="handleEditInputBlur()"
|
||||
@press-enter="handleEditInputEnter(record)"
|
||||
/>
|
||||
<template v-else>
|
||||
<div class="one-line-text max-w-[300px]">
|
||||
<slot :name="item.slotName" v-bind="{ record, rowIndex, column }">
|
||||
{{ record[item.dataIndex as string] || '-' }}
|
||||
</slot>
|
||||
</div>
|
||||
<MsIcon
|
||||
v-if="item.editable && !record.deleted"
|
||||
class="ml-2 cursor-pointer"
|
||||
:class="{ 'ms-table-edit-active': editActiveKey === rowIndex }"
|
||||
type="icon-icon_edit_outlined"
|
||||
@click="handleEdit(item.dataIndex as string, rowIndex)"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-input
|
||||
v-if="
|
||||
|
@ -350,6 +376,7 @@
|
|||
currentInputRef.value[0].focus();
|
||||
} else {
|
||||
nextTick(() => {
|
||||
debugger;
|
||||
currentInputRef.value[0].focus();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
v-model:visible="currentVisible"
|
||||
width="680px"
|
||||
class="ms-modal-form ms-modal-medium"
|
||||
:ok-text="isEdit ? t('common.update') : t('common.create')"
|
||||
unmount-on-close
|
||||
@cancel="handleCancel(false)"
|
||||
>
|
||||
|
@ -104,7 +103,7 @@
|
|||
const formRef = ref<FormInstance>();
|
||||
|
||||
const loading = ref(false);
|
||||
const isEdit = computed(() => !!props.currentProject);
|
||||
const isEdit = computed(() => props.currentProject && props.currentProject.id);
|
||||
const affiliatedOrgOption = ref<SystemOrgOption[]>([]);
|
||||
const appStore = useAppStore();
|
||||
const currentOrgId = computed(() => appStore.currentOrgId);
|
||||
|
|
|
@ -101,8 +101,6 @@
|
|||
dataIndex: 'num',
|
||||
width: 100,
|
||||
showTooltip: true,
|
||||
editable: true,
|
||||
editType: ColumnEditTypeEnum.INPUT,
|
||||
},
|
||||
{
|
||||
title: 'system.organization.name',
|
||||
|
@ -110,7 +108,7 @@
|
|||
editable: true,
|
||||
editType: ColumnEditTypeEnum.INPUT,
|
||||
dataIndex: 'name',
|
||||
showTooltip: true,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: 'system.organization.member',
|
||||
|
@ -251,7 +249,6 @@
|
|||
|
||||
const showAddProjectModal = (record: any) => {
|
||||
const { id, name, description, enable, adminList, organizationId, moduleIds } = record;
|
||||
addProjectVisible.value = true;
|
||||
currentUpdateProject.value = {
|
||||
id,
|
||||
name,
|
||||
|
@ -261,6 +258,7 @@
|
|||
organizationId,
|
||||
moduleIds,
|
||||
};
|
||||
addProjectVisible.value = true;
|
||||
};
|
||||
|
||||
const showAddUserModal = (record: any) => {
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
revokeDeleteOrg,
|
||||
createOrUpdateOrg,
|
||||
} from '@/api/modules/setting/organizationAndProject';
|
||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { ColumnEditTypeEnum, TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
|
@ -105,7 +105,8 @@
|
|||
dataIndex: 'name',
|
||||
width: 200,
|
||||
editable: true,
|
||||
showTooltip: true,
|
||||
editType: ColumnEditTypeEnum.INPUT,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: 'system.organization.member',
|
||||
|
@ -123,6 +124,7 @@
|
|||
{
|
||||
title: 'system.organization.description',
|
||||
dataIndex: 'description',
|
||||
showTooltip: true,
|
||||
},
|
||||
{
|
||||
title: 'system.organization.creator',
|
||||
|
@ -306,4 +308,3 @@
|
|||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@/api/modules/setting/organizationAndProject
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
revokeDeleteProject,
|
||||
createOrUpdateProject,
|
||||
} from '@/api/modules/setting/organizationAndProject';
|
||||
import { TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { ColumnEditTypeEnum, TableKeyEnum } from '@/enums/tableEnum';
|
||||
import { MsTableColumn } from '@/components/pure/ms-table/type';
|
||||
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
|
||||
import MsButton from '@/components/pure/ms-button/index.vue';
|
||||
|
@ -99,7 +99,8 @@
|
|||
slotName: 'name',
|
||||
dataIndex: 'name',
|
||||
editable: true,
|
||||
showTooltip: true,
|
||||
editType: ColumnEditTypeEnum.INPUT,
|
||||
ellipsis: true,
|
||||
width: 300,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue