Skip to content

Commit e00ca7e

Browse files
committed
fix: bug fix
1 parent 7cda519 commit e00ca7e

File tree

12 files changed

+118
-70
lines changed

12 files changed

+118
-70
lines changed

frontend/src/components/layout/Menu.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,9 @@ const routerList = computed(() => {
7474
color: #1cba90 !important;
7575
}
7676
}
77+
78+
.ed-sub-menu .ed-icon {
79+
margin-right: 8px;
80+
}
7781
}
7882
</style>

frontend/src/components/layout/Workspace.vue

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ onMounted(async () => {
7676
<el-icon size="16">
7777
<icon_moments_categories_outlined></icon_moments_categories_outlined>
7878
</el-icon>
79-
<span v-if="!collapse" class="name">{{ currentWorkspace.name }}</span>
79+
<span v-if="!collapse" :title="currentWorkspace.name" class="name ellipsis">{{
80+
currentWorkspace.name
81+
}}</span>
8082
<el-icon v-if="!collapse" style="transform: scale(0.5)" class="expand" size="24">
8183
<icon_expand_down_filled></icon_expand_down_filled>
8284
</el-icon></button
@@ -105,13 +107,17 @@ onMounted(async () => {
105107
<el-icon size="16">
106108
<icon_moments_categories_outlined></icon_moments_categories_outlined>
107109
</el-icon>
108-
<div class="datasource-name" v-html="formatKeywords(ele.name)"></div>
110+
<div
111+
:title="ele.name"
112+
class="datasource-name ellipsis"
113+
v-html="formatKeywords(ele.name)"
114+
></div>
109115
<el-icon size="16" class="done">
110116
<icon_done_outlined></icon_done_outlined>
111117
</el-icon>
112118
</div>
113119
<div v-if="!defaultWorkspaceListWithSearch.length" class="popover-item empty">
114-
没有找到相关结果
120+
{{ $t('model.relevant_results_found') }}
115121
</div>
116122
</div>
117123
</div>
@@ -142,6 +148,7 @@ onMounted(async () => {
142148
font-size: 14px;
143149
line-height: 22px;
144150
margin-left: 8px;
151+
max-width: 120px;
145152
}
146153
147154
.expand {
@@ -203,6 +210,7 @@ onMounted(async () => {
203210
font-weight: 400;
204211
font-size: 14px;
205212
line-height: 22px;
213+
max-width: 180px;
206214
}
207215
208216
.done {

frontend/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@
312312
"old_password": "Old password"
313313
},
314314
"workspace": {
315+
"relevant_content_found": "No relevant content found",
315316
"add_workspace": "Add workspace",
316317
"administrator": "Administrator",
317318
"ordinary_member": "Ordinary member",

frontend/src/i18n/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@
325325
}
326326
},
327327
"workspace": {
328+
"relevant_content_found": "找不到相关内容",
328329
"add_workspace": "添加工作空间",
329330
"administrator": "管理员",
330331
"ordinary_member": "普通成员",

frontend/src/views/ds/DataTable.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import EmptyBackground from '@/views/dashboard/common/EmptyBackground.vue'
88
import edit from '@/assets/svg/icon_edit_outlined.svg'
99
import { useI18n } from 'vue-i18n'
1010
import ParamsForm from './ParamsForm.vue'
11-
import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
1211
1312
interface Table {
1413
name: string

frontend/src/views/ds/Datasource.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ const back = () => {
275275
<EmptyBackground
276276
v-if="!!keywords && !datasourceListWithSearch.length"
277277
:description="$t('datasource.relevant_content_found')"
278+
class="datasource-yet"
278279
img-type="tree"
279280
/>
280281

frontend/src/views/ds/DatasourceForm.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,7 @@ defineExpose({
463463
>
464464
<div v-if="isCreate && activeStep !== 2" class="model-name">
465465
{{ activeName }}
466-
<span
467-
v-if="form.type !== 'excel'"
468-
style="margin-left: 8px; color: #8f959e; font-size: 12px; margin-top: 7px"
469-
>
466+
<span v-if="form.type !== 'excel'" style="margin-left: 8px; color: #8f959e; font-size: 12px">
470467
<span>{{ t('ds.form.support_version') }}:&nbsp;</span>
471468
<span v-if="form.type === 'sqlServer'">2012+</span>
472469
<span v-else-if="form.type === 'oracle'">12+</span>

frontend/src/views/system/member/index.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,11 @@ const handleCurrentChange = (val: number) => {
440440
bottom: 0;
441441
border-top: 1px solid #1f232926;
442442
display: flex;
443+
background-color: #fff;
443444
align-items: center;
444445
padding-left: 24px;
446+
background-color: #fff;
447+
z-index: 10;
445448
446449
.danger-button {
447450
border: 1px solid var(--ed-color-danger);

frontend/src/views/system/permission/index.vue

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,10 @@ const savePermission = () => {
442442
id,
443443
name,
444444
permissions: permissionsObj,
445-
users: isCreate.value
446-
? selectPermissionRef.value.checkedWorkspace.map((ele: any) => ele.id)
447-
: users,
445+
users:
446+
isCreate.value || activeStep.value === 1
447+
? selectPermissionRef.value.checkedWorkspace.map((ele: any) => ele.id)
448+
: users,
448449
}
449450
if (!id) {
450451
delete obj.id
@@ -764,6 +765,7 @@ const columnRules = {
764765
</el-form-item>
765766
<el-form-item :label="$t('permission.set_rule')">
766767
<el-input
768+
v-if="ruleType !== 1"
767769
v-model="searchColumn"
768770
:placeholder="$t('permission.search_rule_group')"
769771
autocomplete="off"
@@ -775,7 +777,9 @@ const columnRules = {
775777
></el-input>
776778
</el-form-item>
777779
</el-form>
778-
<AuthTree v-if="ruleType === 1" ref="authTreeRef" @save="saveAuthTree"></AuthTree>
780+
<div v-if="ruleType === 1" class="auth-tree_content">
781+
<AuthTree ref="authTreeRef" @save="saveAuthTree"></AuthTree>
782+
</div>
779783
<div v-else class="table-content">
780784
<el-table
781785
:empty-text="$t('permission.no_fields_yet')"
@@ -931,6 +935,17 @@ const columnRules = {
931935
padding-top: 0;
932936
}
933937
}
938+
939+
.auth-tree_content {
940+
padding: 16px;
941+
border-radius: 6px;
942+
border: 1px solid #dee0e3;
943+
min-height: 64px;
944+
display: flex;
945+
align-items: center;
946+
overflow-y: auto;
947+
margin-top: -16px;
948+
}
934949
}
935950
936951
.system-permission_user.system-permission_user {

frontend/src/views/system/user/User.vue

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,18 @@
131131
/>
132132
</template>
133133
</el-table>
134-
135-
<div class="pagination-container">
136-
<el-pagination
137-
v-model:current-page="state.pageInfo.currentPage"
138-
v-model:page-size="state.pageInfo.pageSize"
139-
:page-sizes="[10, 20, 30]"
140-
:background="true"
141-
layout="total, sizes, prev, pager, next, jumper"
142-
:total="state.pageInfo.total"
143-
@size-change="handleSizeChange"
144-
@current-change="handleCurrentChange"
145-
/>
146-
</div>
134+
</div>
135+
<div class="pagination-container">
136+
<el-pagination
137+
v-model:current-page="state.pageInfo.currentPage"
138+
v-model:page-size="state.pageInfo.pageSize"
139+
:page-sizes="[10, 20, 30]"
140+
:background="true"
141+
layout="total, sizes, prev, pager, next, jumper"
142+
:total="state.pageInfo.total"
143+
@size-change="handleSizeChange"
144+
@current-change="handleCurrentChange"
145+
/>
147146
</div>
148147

149148
<div v-if="multipleSelectionAll.length" class="bottom-select">
@@ -193,6 +192,7 @@
193192
<el-form-item prop="account" :label="t('user.account')">
194193
<el-input
195194
v-model="state.form.account"
195+
:disabled="!!state.form.id"
196196
:placeholder="$t('datasource.please_enter') + $t('common.empty') + $t('user.account')"
197197
autocomplete="off"
198198
/>
@@ -316,6 +316,7 @@ const dialogVisiblePassword = ref(false)
316316
const isIndeterminate = ref(true)
317317
const drawerMainRef = ref()
318318
const userImportRef = ref()
319+
const selectionLoading = ref(false)
319320
const filterOption = ref<any[]>([
320321
{
321322
type: 'enum',
@@ -359,7 +360,7 @@ const defaultForm = {
359360
account: '',
360361
oid: 0,
361362
email: '',
362-
status: '',
363+
status: 1,
363364
phoneNumber: '',
364365
oid_list: [],
365366
}
@@ -451,7 +452,9 @@ const handleConfirmPassword = () => {
451452
})
452453
dialogVisiblePassword.value = false
453454
}
455+
454456
const handleSelectionChange = (val: any[]) => {
457+
if (selectionLoading.value) return
455458
const ids = state.tableData.map((ele: any) => ele.id)
456459
multipleSelectionAll.value = [
457460
...multipleSelectionAll.value.filter((ele) => !ids.includes(ele.id)),
@@ -481,6 +484,7 @@ const handleToggleRowSelection = (check: boolean = true) => {
481484
}
482485
checkAll.value = i === state.tableData.length
483486
isIndeterminate.value = !(i === 0 || i === state.tableData.length)
487+
selectionLoading.value = false
484488
}
485489
const handleSearch = () => {
486490
search()
@@ -541,6 +545,7 @@ const deleteBatchUser = () => {
541545
autofocus: false,
542546
}).then(() => {
543547
userApi.deleteBatch(multipleSelectionAll.value.map((ele) => ele.id)).then(() => {
548+
multipleSelectionAll.value = []
544549
ElMessage({
545550
type: 'success',
546551
message: t('dashboard.delete_success'),
@@ -557,13 +562,20 @@ const deleteHandler = (row: any) => {
557562
customClass: 'confirm-no_icon',
558563
autofocus: false,
559564
}).then(() => {
560-
userApi.delete(row.id).then(() => {
561-
ElMessage({
562-
type: 'success',
563-
message: t('dashboard.delete_success'),
564-
})
565-
search()
565+
multipleSelectionAll.value = multipleSelectionAll.value.filter((ele) => ele.id !== row.id)
566+
ElMessage({
567+
type: 'success',
568+
message: t('dashboard.delete_success'),
566569
})
570+
search()
571+
// userApi.delete(row.id).then(() => {
572+
// multipleSelectionAll.value = multipleSelectionAll.value.filter((ele) => ele.id !== row.id)
573+
// ElMessage({
574+
// type: 'success',
575+
// message: t('dashboard.delete_success'),
576+
// })
577+
// search()
578+
// })
567579
})
568580
}
569581
@@ -613,7 +625,7 @@ const search = () => {
613625
.then((res: any) => {
614626
state.tableData = res.items
615627
state.pageInfo.total = res.total
616-
628+
selectionLoading.value = true
617629
nextTick(() => {
618630
handleToggleRowSelection()
619631
})
@@ -692,11 +704,13 @@ onMounted(() => {
692704
height: 64px;
693705
width: calc(100% + 48px);
694706
left: -24px;
707+
background-color: #fff;
695708
bottom: 0;
696709
border-top: 1px solid #1f232926;
697710
display: flex;
698711
align-items: center;
699712
padding-left: 24px;
713+
z-index: 10;
700714
701715
.danger-button {
702716
border: 1px solid var(--ed-color-danger);
@@ -734,12 +748,8 @@ onMounted(() => {
734748
.sqlbot-table {
735749
border-radius: 6px;
736750
width: 100%;
737-
max-height: calc(100vh - 100px);
751+
max-height: calc(100vh - 150px);
738752
overflow-y: auto;
739-
740-
&.is-filter {
741-
max-height: calc(100vh - 256px);
742-
}
743753
:deep(.ed-table) {
744754
--el-table-header-bg-color: #f5f7fa;
745755
--el-table-border-color: #ebeef5;
@@ -795,12 +805,13 @@ onMounted(() => {
795805
}
796806
}
797807
}
798-
.pagination-container {
799-
display: flex;
800-
justify-content: end;
801-
align-items: center;
802-
margin-top: 16px;
803-
}
808+
}
809+
810+
.pagination-container {
811+
display: flex;
812+
justify-content: end;
813+
align-items: center;
814+
margin-top: 16px;
804815
}
805816
}
806817

0 commit comments

Comments
 (0)