fix: bug#13946
This commit is contained in:
parent
33a70b8c79
commit
8753862d96
|
@ -60,6 +60,7 @@ import {
|
|||
addDepartment_api,
|
||||
updateDepartment_api,
|
||||
} from '@/api/system/department';
|
||||
import { onlyMessage } from '@/utils/comm'
|
||||
|
||||
type treeType = {
|
||||
id: string;
|
||||
|
@ -91,6 +92,7 @@ const confirm = () => {
|
|||
?.validate()
|
||||
.then(() => form.submit())
|
||||
.then((resp: any) => {
|
||||
onlyMessage('操作成功')
|
||||
emits('refresh', resp.result.id);
|
||||
emits('update:visible', false);
|
||||
})
|
||||
|
|
|
@ -32,7 +32,12 @@
|
|||
:fieldNames="{ key: 'id' }"
|
||||
>
|
||||
<template #title="{ name, data }">
|
||||
<span>{{ name }}</span>
|
||||
<div class='department-tree-item-content'>
|
||||
<span class='title'>
|
||||
<j-ellipsis>
|
||||
{{ name }}
|
||||
</j-ellipsis>
|
||||
</span>
|
||||
<span class="func-btns" @click="(e) => e.stopPropagation()">
|
||||
<PermissionButton
|
||||
:hasPermission="`${permission}:update`"
|
||||
|
@ -72,6 +77,7 @@
|
|||
<AIcon type="DeleteOutlined" />
|
||||
</PermissionButton>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</jTree>
|
||||
<j-empty v-else description="暂无数据" />
|
||||
|
@ -246,17 +252,6 @@ function init() {
|
|||
flex: 1 1 auto;
|
||||
|
||||
.ant-tree-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.func-btns {
|
||||
display: none;
|
||||
font-size: 14px;
|
||||
.ant-btn-link {
|
||||
padding: 0 4px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.func-btns {
|
||||
display: block;
|
||||
|
@ -271,6 +266,24 @@ function init() {
|
|||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
|
||||
.department-tree-item-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
width: calc(100% - 80px);
|
||||
}
|
||||
.func-btns {
|
||||
//display: none;
|
||||
font-size: 14px;
|
||||
width: 80px;
|
||||
:deep(.ant-btn-link) {
|
||||
padding: 0 4px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
|
Loading…
Reference in New Issue