Skip to content

Commit 07f3088

Browse files
authored
Merge pull request #406 from tapdata/develop
Develop
2 parents bb44d93 + a6771f1 commit 07f3088

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3468
-1005
lines changed

apps/daas/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
"nodemon": "^2.0.7",
5656
"rollup-plugin-visualizer": "^5.14.0",
5757
"sass": "^1.86.2",
58-
"unplugin-auto-import": "^0.17.6",
58+
"unplugin-auto-import": "^19.2.0",
5959
"unplugin-icons": "^0.19.0",
60-
"unplugin-vue-components": "^0.27.0",
60+
"unplugin-vue-components": "^28.5.0",
6161
"vite": "^6.2.4",
6262
"vue-tsc": "^2.0.21"
6363
},

apps/daas/src/auto-imports.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// @ts-nocheck
44
// noinspection JSUnusedGlobalSymbols
55
// Generated by unplugin-auto-import
6+
// biome-ignore lint: disable
67
export {}
78
declare global {
89
const ElIcon: typeof import('element-plus/es')['ElIcon']

apps/daas/src/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ declare module 'vue' {
3434
ElDropdown: typeof import('element-plus/es')['ElDropdown']
3535
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
3636
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
37-
ElEmpty: typeof import('element-plus/es')['ElEmpty']
3837
ElForm: typeof import('element-plus/es')['ElForm']
3938
ElFormItem: typeof import('element-plus/es')['ElFormItem']
4039
ElHeader: typeof import('element-plus/es')['ElHeader']
@@ -65,6 +64,7 @@ declare module 'vue' {
6564
ElRow: typeof import('element-plus/es')['ElRow']
6665
ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
6766
ElSelect: typeof import('element-plus/es')['ElSelect']
67+
ElSelectLoading: typeof import('element-plus/es')['ElSelectLoading']
6868
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
6969
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
7070
ElSkeletonItem: typeof import('element-plus/es')['ElSkeletonItem']

apps/daas/src/layouts/Header.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,11 @@ defineExpose({
244244
</script>
245245

246246
<template>
247-
<ElHeader v-if="!IS_IFRAME" class="flex align-center gap-4" height="64px">
247+
<ElHeader
248+
v-if="!IS_IFRAME"
249+
class="flex align-center gap-4 layout-header"
250+
height="64px"
251+
>
248252
<a
249253
v-if="isOP"
250254
class="logo w-auto text-white flex align-center gap-2"
@@ -379,6 +383,11 @@ defineExpose({
379383
</template>
380384

381385
<style lang="scss" scoped>
386+
.layout-header {
387+
:deep(.el-button .el-icon:only-child) {
388+
color: var(--icon-n1);
389+
}
390+
}
382391
.divider {
383392
height: 1.8em;
384393
border-color: rgba(60, 60, 67, 0.12);

apps/daas/src/views/user/List.vue

Lines changed: 80 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { roleApi, roleMappingsApi, usersApi } from '@tap/api'
33
import { TablePage } from '@tap/business'
44
55
import PageContainer from '@tap/business/src/components/PageContainer.vue'
6-
import { FilterBar } from '@tap/component'
6+
import { DownBoldOutlined, FilterBar } from '@tap/component'
77
import dayjs from 'dayjs'
88
import { escapeRegExp } from 'lodash-es'
99
@@ -12,6 +12,7 @@ export default {
1212
PageContainer,
1313
TablePage,
1414
FilterBar,
15+
DownBoldOutlined,
1516
},
1617
data() {
1718
return {
@@ -344,14 +345,18 @@ export default {
344345
345346
// 选择分类
346347
handleSelectTag() {
347-
const tagList = {}
348+
const tagList = []
349+
const tagMap = {}
350+
348351
this.multipleSelection.forEach((row) => {
349-
if (row.listtags && row.listtags.length > 0) {
350-
tagList[row.listtags[0].id] = {
351-
value: row.listtags[0].value,
352+
row.listtags.forEach((item) => {
353+
if (!tagMap[item.id]) {
354+
tagList.push(item)
355+
tagMap[item.id] = true
352356
}
353-
}
357+
})
354358
})
359+
355360
return tagList
356361
},
357362
// 分类设置保存
@@ -655,40 +660,6 @@ export default {
655660
<template>
656661
<PageContainer>
657662
<template #actions>
658-
<el-button
659-
v-show="multipleSelection.length > 0"
660-
v-readonlybtn="'user_category_application'"
661-
class="btn"
662-
@click="$refs.table.showClassify(handleSelectTag())"
663-
>
664-
<span> {{ $t('public_button_bulk_tag') }}</span>
665-
</el-button>
666-
<el-dropdown
667-
v-show="multipleSelection.length > 0"
668-
v-readonlybtn="'user_edition'"
669-
@command="handleCommand($event)"
670-
>
671-
<el-button class="btn btn-dropdowm">
672-
<i class="iconfont icon-piliang back-btn-icon" />
673-
<span> {{ $t('public_button_bulk_operation') }}</span>
674-
</el-button>
675-
<template #dropdown>
676-
<el-dropdown-menu>
677-
<el-dropdown-item v-if="$has('user_edition')" command="activated">
678-
{{ $t('user_list_bulk_activation') }}
679-
</el-dropdown-item>
680-
<el-dropdown-item v-if="$has('user_edition')" command="rejected">{{
681-
$t('user_list_bulk_freeze')
682-
}}</el-dropdown-item>
683-
<el-dropdown-item
684-
v-if="$has('user_edition')"
685-
command="notActivated"
686-
>
687-
{{ $t('user_list_bulk_check') }}
688-
</el-dropdown-item>
689-
</el-dropdown-menu>
690-
</template>
691-
</el-dropdown>
692663
<el-button
693664
v-readonlybtn="'new_model_creation'"
694665
class="btn btn-create"
@@ -702,16 +673,35 @@ export default {
702673
<TablePage
703674
ref="table"
704675
row-key="id"
705-
class="user-list"
706-
:classify="{ authority: 'user_category_management', types: ['user'] }"
676+
class="user-table-page"
677+
:classify="{
678+
authority: 'user_category_management',
679+
types: ['user'],
680+
hideIcon: true,
681+
}"
707682
:remote-method="getData"
708683
@selection-change="handleSelectionChange"
709684
@classify-submit="handleOperationClassify"
710685
@sort-change="handleSortTable"
711686
>
712-
<template #nav>
713-
<div class="tapNav">
714-
<ElTabs v-model="activePanel" @tab-change="handleTapClick">
687+
<template #nav="{ openClassify }">
688+
<div class="tapNav position-relative">
689+
<el-button
690+
class="position-absolute z-10 start-0"
691+
text
692+
style="top: 4px"
693+
@click="openClassify"
694+
>
695+
<template #icon>
696+
<VIcon>expand-list</VIcon>
697+
</template>
698+
</el-button>
699+
700+
<ElTabs
701+
v-model="activePanel"
702+
style="--el-tabs-padding-left: 36px; --el-tabs-header-height: 36px"
703+
@tab-change="handleTapClick"
704+
>
715705
<ElTabPane
716706
v-for="item in muneList"
717707
:key="item.icon"
@@ -757,6 +747,45 @@ export default {
757747
</div>
758748
</template>
759749
750+
<template #multipleSelectionActions>
751+
<el-button
752+
v-readonlybtn="'user_category_application'"
753+
class="btn"
754+
@click="$refs.table.showClassify(handleSelectTag())"
755+
>
756+
<span> {{ $t('public_button_bulk_tag') }}</span>
757+
</el-button>
758+
<el-dropdown
759+
v-readonlybtn="'user_edition'"
760+
@command="handleCommand($event)"
761+
>
762+
<el-button class="btn btn-dropdowm">
763+
<span> {{ $t('public_button_bulk_operation') }}</span>
764+
<el-icon class="ml-1">
765+
<DownBoldOutlined />
766+
</el-icon>
767+
</el-button>
768+
<template #dropdown>
769+
<el-dropdown-menu>
770+
<el-dropdown-item v-if="$has('user_edition')" command="activated">
771+
{{ $t('user_list_bulk_activation') }}
772+
</el-dropdown-item>
773+
<el-dropdown-item
774+
v-if="$has('user_edition')"
775+
command="rejected"
776+
>{{ $t('user_list_bulk_freeze') }}</el-dropdown-item
777+
>
778+
<el-dropdown-item
779+
v-if="$has('user_edition')"
780+
command="notActivated"
781+
>
782+
{{ $t('user_list_bulk_check') }}
783+
</el-dropdown-item>
784+
</el-dropdown-menu>
785+
</template>
786+
</el-dropdown>
787+
</template>
788+
760789
<el-table-column type="selection" width="45" :reserve-selection="true" />
761790
<el-table-column
762791
:label="$t('user_list_user_name')"
@@ -1039,6 +1068,12 @@ export default {
10391068
</template>
10401069
10411070
<style lang="scss" scoped>
1071+
.user-table-page {
1072+
:deep(.classification) {
1073+
margin-top: -6px !important;
1074+
}
1075+
}
1076+
10421077
.user-list-wrap {
10431078
.tapNav {
10441079
:deep(.el-tabs__header) {
@@ -1078,35 +1113,3 @@ export default {
10781113
}
10791114
}
10801115
</style>
1081-
1082-
<style lang="scss">
1083-
.user-list-wrap {
1084-
.table-page-container {
1085-
.table-page-body {
1086-
.table-page-topbar {
1087-
padding-inline: 16px;
1088-
background-color: map.get($bgColor, white);
1089-
}
1090-
.el-table,
1091-
.el-pagination {
1092-
padding-inline: 16px;
1093-
box-sizing: border-box;
1094-
overflow: hidden;
1095-
}
1096-
.table-page-pagination {
1097-
margin-top: 0;
1098-
//padding: 5px 20px;
1099-
background-color: map.get($bgColor, white);
1100-
box-sizing: border-box;
1101-
}
1102-
.status {
1103-
padding: 5px 10px;
1104-
border-radius: 4px;
1105-
}
1106-
}
1107-
}
1108-
.classification {
1109-
margin-left: 16px;
1110-
}
1111-
}
1112-
</style>

apps/daas/src/vuex/modules/feature.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { licensesApi } from '@tap/api'
2-
import { SettingList } from '@/router/menu'
32

43
const MENU_FEATURE_MAP = {
54
dataService: 'dataService',

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
"vue-virtual-scroller": "2.0.0-beta.8"
6767
},
6868
"patchedDependencies": {
69-
"@formily/element-plus@1.1.0": "patches/@formily__element-plus@1.1.0.patch"
69+
"@formily/element-plus@1.1.0": "patches/@formily__element-plus@1.1.0.patch",
70+
"@formily/vue@2.3.3": "patches/@formily__vue@2.3.3.patch"
7071
}
7172
},
7273
"prettier": "@sxzz/prettier-config"

packages/api/src/Connections.ts

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Http from './Http'
21
import { isPlainObj } from '@tap/shared'
2+
import Http from './Http'
33

44
export default class Connections extends Http {
55
constructor() {
@@ -8,10 +8,10 @@ export default class Connections extends Http {
88
get(params = {}, filter) {
99
if (Array.isArray(params)) {
1010
filter = typeof filter === 'object' ? JSON.stringify(filter) : filter
11-
let qs = filter ? '?filter=' + encodeURIComponent(filter) : ''
12-
return this.axios.get(this.url + '/' + params.join('/') + qs)
11+
const qs = filter ? `?filter=${encodeURIComponent(filter)}` : ''
12+
return this.axios.get(`${this.url}/${params.join('/')}${qs}`)
1313
} else if (typeof params === 'string') {
14-
return this.axios.get(this.url + '/' + params, { params: filter })
14+
return this.axios.get(`${this.url}/${params}`, { params: filter })
1515
}
1616

1717
const config = { params }
@@ -23,12 +23,12 @@ export default class Connections extends Http {
2323
customQuery(id: string, params: { [key: string]: unknown }) {
2424
let url = `${this.url}/${id}` + '/customQuery?'
2525
for (const item in params) {
26-
url += item + '=' + params[item] + '&'
26+
url += `${item}=${params[item]}&`
2727
}
2828
return this.axios.get(url)
2929
}
3030
copy(id: string, params: unknown) {
31-
return this.axios.post(this.url + '/' + id + '/copy', params)
31+
return this.axios.post(`${this.url}/${id}/copy`, params)
3232
}
3333
batchUpdateListtags(params: unknown) {
3434
return this.axios.patch(`${this.url}/batchUpdateListtags`, params)
@@ -50,17 +50,25 @@ export default class Connections extends Http {
5050
return this.axios.patch(`${this.url}/${id}`, params)
5151
}
5252
findAll(filter: unknown) {
53-
return this.axios.get(`${this.url}/findAll?filter=` + encodeURIComponent(JSON.stringify(filter)))
53+
return this.axios.get(
54+
`${this.url}/findAll?filter=${encodeURIComponent(
55+
JSON.stringify(filter),
56+
)}`,
57+
)
5458
}
5559
listAll(filter: unknown) {
56-
return this.axios.get(`${this.url}/listAll?filter=` + encodeURIComponent(JSON.stringify(filter)))
60+
return this.axios.get(
61+
`${this.url}/listAll?filter=${encodeURIComponent(
62+
JSON.stringify(filter),
63+
)}`,
64+
)
5765
}
5866
checkConnectionTask(id: string) {
59-
return this.axios.get(`${this.url}/task/` + id + '/10')
67+
return this.axios.get(`${this.url}/task/${id}/10`)
6068
}
6169

6270
getStats() {
63-
return this.axios.get(this.url + '/stats')
71+
return this.axios.get(`${this.url}/stats`)
6472
}
6573
create(params: unknown, urlParams: any) {
6674
let url = this.url
@@ -73,7 +81,13 @@ export default class Connections extends Http {
7381
return this.axios.get(`${this.url}/${connectionId}/heartbeat-task`)
7482
}
7583
usingDigginTaskByConnectionId(connectionId) {
76-
return this.axios.get(`${this.url}/${connectionId}/usingDigginTaskByConnectionId`)
84+
return this.axios.get(
85+
`${this.url}/${connectionId}/usingDigginTaskByConnectionId`,
86+
)
87+
}
88+
89+
getDatabaseTypes() {
90+
return this.axios.get(`${this.url}/databaseTypes`)
7791
}
7892
}
7993

0 commit comments

Comments
 (0)