Skip to content

Commit 73f72a1

Browse files
fix: icon
1 parent 55c9446 commit 73f72a1

File tree

13 files changed

+210
-221
lines changed

13 files changed

+210
-221
lines changed

ui/src/components/app-table/index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<template>
22
<div class="app-table" :class="quickCreate ? 'table-quick-append' : ''">
3-
<el-table :max-height="tableHeight" v-bind="$attrs" ref="appTableRef">
3+
<el-table
4+
:max-height="tableHeight"
5+
v-bind="$attrs"
6+
ref="appTableRef"
7+
:tooltip-options="{
8+
popperClass: 'max-w-350',
9+
}"
10+
>
411
<template #append v-if="quickCreate">
512
<div v-if="showInput">
613
<el-input

ui/src/components/resource_mapping/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@
9494
:maxTableHeight="200"
9595
:row-key="(row: any) => row.id"
9696
v-loading="loading"
97-
:tooltip-options="{
98-
popperClass: 'max-w-350',
99-
}"
97+
10098
>
10199
<el-table-column prop="name" :label="$t('common.name')" min-width="130" show-overflow-tooltip>
102100
<template #default="{ row }">

ui/src/views/system-resource-management/ApplicationResourceIndex.vue

Lines changed: 52 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
style="width: 120px"
1616
@change="search_type_change"
1717
>
18-
<el-option :label="$t('common.creator')" value="create_user"/>
18+
<el-option :label="$t('common.creator')" value="create_user" />
1919

20-
<el-option :label="$t('common.name')" value="name"/>
21-
<el-option :label="$t('common.type')" value="type"/>
20+
<el-option :label="$t('common.name')" value="name" />
21+
<el-option :label="$t('common.type')" value="type" />
2222
</el-select>
2323
<el-input
2424
v-if="search_type === 'name'"
@@ -36,7 +36,7 @@
3636
filterable
3737
style="width: 220px"
3838
>
39-
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name"/>
39+
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
4040
</el-select>
4141
<el-select
4242
v-else-if="search_type === 'type'"
@@ -46,7 +46,7 @@
4646
filterable
4747
style="width: 220px"
4848
>
49-
<el-option v-for="u in type_options" :key="u.id" :value="u.value" :label="u.label"/>
49+
<el-option v-for="u in type_options" :key="u.id" :value="u.value" :label="u.label" />
5050
</el-select>
5151
</div>
5252
</div>
@@ -60,23 +60,19 @@
6060
>
6161
<!-- <el-table-column type="selection" width="55" /> -->
6262
<el-table-column width="220" :label="$t('common.name')" show-overflow-tooltip>
63-
<template #default="scope">
64-
<div class="table-name flex align-center">
65-
<el-icon size="24" class="mr-8">
66-
<el-avatar shape="square" :size="24" style="background: none" class="mr-8">
67-
<img :src="resetUrl(scope.row?.icon)" alt=""/>
68-
</el-avatar>
69-
</el-icon>
70-
{{ scope.row.name }}
71-
</div>
63+
<template #default="{ row }">
64+
<el-space :size="8">
65+
<el-avatar shape="square" :size="24" style="background: none">
66+
<img :src="resetUrl(row?.icon)" alt="" />
67+
</el-avatar>
68+
<span class="ellipsis" style="max-width: 160px">
69+
{{ row.name }}
70+
</span>
71+
</el-space>
7272
</template>
7373
</el-table-column>
7474

75-
<el-table-column
76-
prop="tool_type"
77-
:label="$t('common.type')"
78-
width="160"
79-
>
75+
<el-table-column prop="tool_type" :label="$t('common.type')" width="100">
8076
<template #default="scope">
8177
<el-tag class="warning-tag" v-if="isWorkFlow(scope.row.type)">
8278
{{ $t('views.application.senior') }}
@@ -104,7 +100,7 @@
104100
@click="statusVisible = !statusVisible"
105101
>
106102
<el-icon>
107-
<Filter/>
103+
<Filter />
108104
</el-icon>
109105
</el-button>
110106
</template>
@@ -127,10 +123,10 @@
127123
</div>
128124
<div class="text-right">
129125
<el-button size="small" @click="filterStatusChange('clear')"
130-
>{{ $t('common.clear') }}
126+
>{{ $t('common.clear') }}
131127
</el-button>
132128
<el-button type="primary" @click="filterStatusChange" size="small"
133-
>{{ $t('common.confirm') }}
129+
>{{ $t('common.confirm') }}
134130
</el-button>
135131
</div>
136132
</el-popover>
@@ -139,7 +135,7 @@
139135
<template #default="scope">
140136
<div v-if="scope.row.is_publish" class="flex align-center">
141137
<el-icon class="color-success mr-8" style="font-size: 16px">
142-
<SuccessFilled/>
138+
<SuccessFilled />
143139
</el-icon>
144140
<span class="color-text-primary">
145141
{{ $t('common.status.published') }}
@@ -172,7 +168,7 @@
172168
@click="workspaceVisible = !workspaceVisible"
173169
>
174170
<el-icon>
175-
<Filter/>
171+
<Filter />
176172
</el-icon>
177173
</el-button>
178174
</template>
@@ -198,24 +194,24 @@
198194
/>
199195
</el-checkbox-group>
200196
</el-scrollbar>
201-
<el-empty v-else :description="$t('common.noData')"/>
197+
<el-empty v-else :description="$t('common.noData')" />
202198
</div>
203199
</div>
204200
</div>
205201
<div class="text-right">
206202
<el-button size="small" @click="filterWorkspaceChange('clear')"
207-
>{{ $t('common.clear') }}
203+
>{{ $t('common.clear') }}
208204
</el-button>
209205
<el-button type="primary" @click="filterWorkspaceChange" size="small"
210-
>{{ $t('common.confirm') }}
206+
>{{ $t('common.confirm') }}
211207
</el-button>
212208
</div>
213209
</el-popover>
214210
</div>
215211
</template>
216212
</el-table-column>
217213

218-
<el-table-column prop="nick_name" :label="$t('common.creator')" show-overflow-tooltip/>
214+
<el-table-column prop="nick_name" :label="$t('common.creator')" show-overflow-tooltip />
219215
<el-table-column :label="$t('views.application.publishTime')" width="180">
220216
<template #default="{ row }">
221217
{{ datetimeFormat(row.update_time) }}
@@ -310,24 +306,24 @@
310306
</template>
311307

312308
<script lang="ts" setup>
313-
import {onMounted, ref, reactive, computed, watch} from 'vue'
314-
import {useRouter, useRoute} from 'vue-router'
309+
import { onMounted, ref, reactive, computed, watch } from 'vue'
310+
import { useRouter, useRoute } from 'vue-router'
315311
import ApplicationResourceApi from '@/api/system-resource-management/application'
316312
import ResourceAuthorizationDrawer from '@/components/resource-authorization-drawer/index.vue'
317-
import {t} from '@/locales'
318-
import {isAppIcon, resetUrl} from '@/utils/common'
313+
import { t } from '@/locales'
314+
import { isAppIcon, resetUrl } from '@/utils/common'
319315
import useStore from '@/stores'
320-
import {datetimeFormat} from '@/utils/time'
321-
import {loadPermissionApi} from '@/utils/dynamics-api/permission-api.ts'
322-
import {isWorkFlow} from '@/utils/application.ts'
316+
import { datetimeFormat } from '@/utils/time'
317+
import { loadPermissionApi } from '@/utils/dynamics-api/permission-api.ts'
318+
import { isWorkFlow } from '@/utils/application.ts'
323319
import UserApi from '@/api/user/user.ts'
324320
import permissionMap from '@/permission'
325-
import {MsgSuccess, MsgConfirm, MsgError} from '@/utils/message'
326-
import {SourceTypeEnum} from '@/enums/common'
321+
import { MsgSuccess, MsgConfirm, MsgError } from '@/utils/message'
322+
import { SourceTypeEnum } from '@/enums/common'
327323
328324
const router = useRouter()
329325
const route = useRoute()
330-
const {user, application} = useStore()
326+
const { user, application } = useStore()
331327
332328
const permissionPrecise = computed(() => {
333329
return permissionMap['application']['systemManage']
@@ -365,20 +361,20 @@ function toChat(row: any) {
365361
.map((v: any) => {
366362
apiInputParams.value = v.properties.api_input_field_list
367363
? v.properties.api_input_field_list.map((v: any) => {
368-
return {
369-
name: v.variable,
370-
value: v.default_value,
371-
}
372-
})
364+
return {
365+
name: v.variable,
366+
value: v.default_value,
367+
}
368+
})
373369
: v.properties.input_field_list
374370
? v.properties.input_field_list
375-
.filter((v: any) => v.assignment_method === 'api_input')
376-
.map((v: any) => {
377-
return {
378-
name: v.variable,
379-
value: v.default_value,
380-
}
381-
})
371+
.filter((v: any) => v.assignment_method === 'api_input')
372+
.map((v: any) => {
373+
return {
374+
name: v.variable,
375+
value: v.default_value,
376+
}
377+
})
382378
: []
383379
})
384380
const apiParams = mapToUrlParams(apiInputParams.value)
@@ -402,7 +398,9 @@ function mapToUrlParams(map: any[]) {
402398
function deleteApplication(row: any) {
403399
MsgConfirm(
404400
`${t('views.application.delete.confirmTitle')}${row.name} ?`,
405-
row.resource_count > 0 ? t('views.application.delete.resourceCountMessage', row.resource_count) : '',
401+
row.resource_count > 0
402+
? t('views.application.delete.resourceCountMessage', row.resource_count)
403+
: '',
406404
{
407405
confirmButtonText: t('common.confirm'),
408406
cancelButtonText: t('common.cancel'),
@@ -416,8 +414,7 @@ function deleteApplication(row: any) {
416414
MsgSuccess(t('common.deleteSuccess'))
417415
})
418416
})
419-
.catch(() => {
420-
})
417+
.catch(() => {})
421418
}
422419
423420
const exportApplication = (application: any) => {
@@ -484,7 +481,7 @@ watch(
484481
v.label.toLowerCase().includes(filterText.value.toLowerCase()),
485482
)
486483
},
487-
{immediate: true},
484+
{ immediate: true },
488485
)
489486
490487
function filterWorkspaceChange(val: string) {
@@ -515,7 +512,7 @@ async function getWorkspaceList() {
515512
}
516513
517514
const search_type_change = () => {
518-
search_form.value = {name: '', create_user: '', type: ''}
515+
search_form.value = { name: '', create_user: '', type: '' }
519516
}
520517
521518
function getList() {

ui/src/views/system-resource-management/KnowledgeResourceIndex.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@
6060
<!-- <el-table-column type="selection" width="55" /> -->
6161
<el-table-column width="220" :label="$t('common.name')" show-overflow-tooltip>
6262
<template #default="{ row }">
63-
<div class="flex align-center">
63+
<el-space :size="8">
6464
<KnowledgeIcon :type="row.type" :size="24" />
65-
<span class="ml-8">
65+
<span class="ellipsis" style="max-width: 160px">
6666
{{ row.name }}
6767
</span>
68-
</div>
68+
</el-space>
6969
</template>
7070
</el-table-column>
7171

0 commit comments

Comments
 (0)