Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.

Commit 3fbd453

Browse files
authored
Merge pull request #43 from humpback/develop-0.0.1
Develop 0.0.1
2 parents d2e2608 + b627242 commit 3fbd453

File tree

15 files changed

+440
-428
lines changed

15 files changed

+440
-428
lines changed

front/projects/web/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ declare module 'vue' {
4949
ElSegmented: typeof import('element-plus/es')['ElSegmented']
5050
ElSelect: typeof import('element-plus/es')['ElSelect']
5151
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
52+
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
5253
ElSlider: typeof import('element-plus/es')['ElSlider']
5354
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
5455
ElSwitch: typeof import('element-plus/es')['ElSwitch']
@@ -86,7 +87,6 @@ declare module 'vue' {
8687
IconMdiNoteText: typeof import('~icons/mdi/note-text')['default']
8788
IconMdiPerformance: typeof import('~icons/mdi/performance')['default']
8889
IconMdiPlay: typeof import('~icons/mdi/play')['default']
89-
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
9090
IconMdiRemove: typeof import('~icons/mdi/remove')['default']
9191
IconMdiRestart: typeof import('~icons/mdi/restart')['default']
9292
IconMdiSearch: typeof import('~icons/mdi/search')['default']
28.5 KB
Loading

front/projects/web/src/views/administration/registries/registries.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ onMounted(() => search())
105105
<el-table-column :label="t('label.action')" align="right" fixed="right" header-align="center" width="130">
106106
<template #default="scope">
107107
<el-button link type="primary" @click="openAction(Action.Edit, scope.row)">{{ t("btn.edit") }}</el-button>
108-
<el-button v-if="!isDefaultRegistry(scope.row.url)" link type="danger" @click="openAction(Action.Delete, scope.row)"
109-
>{{ t("btn.delete") }}
108+
<el-button v-if="!isDefaultRegistry(scope.row.url)" link type="danger" @click="openAction(Action.Delete, scope.row)">
109+
{{ t("btn.delete") }}
110110
</el-button>
111111
</template>
112112
</el-table-column>

front/projects/web/src/views/my-account/change-password.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async function save() {
8282
</el-form>
8383
<template #footer>
8484
<el-button @click="show = false">{{ t("btn.cancel") }}</el-button>
85-
<el-button v-loading="loading" type="primary" @click="save">{{ t("btn.save") }}</el-button>
85+
<el-button :loading="loading" type="primary" @click="save">{{ t("btn.save") }}</el-button>
8686
</template>
8787
</v-dialog>
8888
</template>

front/projects/web/src/views/my-account/my-account.vue

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const { t } = useI18n()
1010
const userStore = useUserStore()
1111
1212
const loading = ref(false)
13+
const isAction = ref(false)
1314
const isLoadingActivities = ref(false)
1415
const userInfo = ref<UserInfo>(NewUserEmptyInfo())
1516
@@ -77,12 +78,15 @@ async function save() {
7778
if (!(await tableRef.value?.validate())) {
7879
return
7980
}
80-
await userService.updateMeInfo({
81-
username: userInfo.value.username,
82-
email: userInfo.value.email,
83-
phone: userInfo.value.phone,
84-
description: userInfo.value.description
85-
})
81+
isAction.value = true
82+
await userService
83+
.updateMeInfo({
84+
username: userInfo.value.username,
85+
email: userInfo.value.email,
86+
phone: userInfo.value.phone,
87+
description: userInfo.value.description
88+
})
89+
.finally(() => (isAction.value = false))
8690
ShowSuccessMsg(t("message.saveSuccess"))
8791
await Promise.all([getUserInfo(), getUserActivities()])
8892
}
@@ -137,7 +141,7 @@ onMounted(async () => {
137141
<el-col>
138142
<el-form-item>
139143
<div class="text-align-right w-100">
140-
<el-button type="primary" @click="save()">{{ t("btn.save") }}</el-button>
144+
<el-button :loading="isAction" type="primary" @click="save()">{{ t("btn.save") }}</el-button>
141145
</div>
142146
</el-form-item>
143147
</el-col>
@@ -146,16 +150,12 @@ onMounted(async () => {
146150
</v-card>
147151

148152
<v-card class="mt-5">
149-
<div class="d-flex gap-1">
153+
<div class="d-flex gap-2">
150154
<div class="f-bold">
151155
{{ t("label.activities") }}
152156
</div>
153-
<el-button :disabled="isLoadingActivities" :title="t('label.refresh')" link type="primary" @click="getUserActivities()">
154-
<el-icon v-if="!isLoadingActivities" :size="20">
155-
<IconMdiRefresh />
156-
</el-icon>
157-
<v-loading v-else />
158-
</el-button>
157+
<el-button :disabled="isLoadingActivities" plain size="small" type="success" @click="getUserActivities()"> {{ t("btn.refresh") }}</el-button>
158+
<v-loading v-if="isLoadingActivities" />
159159
</div>
160160
<div class="activity-content">
161161
<v-table
@@ -179,7 +179,7 @@ onMounted(async () => {
179179
</el-table-column>
180180
<el-table-column :label="t('label.description')" min-width="200px">
181181
<template #default="scope">
182-
<span>{{ t(`activity.account.${scope.row.action}`) }}</span>
182+
<span>{{ scope.row.action ? t(`activity.account.${scope.row.action}`) : "--" }}</span>
183183
</template>
184184
</el-table-column>
185185
<el-table-column width="160px">

front/projects/web/src/views/service-management/service/activity/activity.vue

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
<script lang="ts" setup>
22
import { TableHeight } from "@/utils"
33
import { ActivityInfo } from "@/types"
4+
import VLoading from "@/components/business/v-loading/VLoading.vue"
5+
import { refreshData } from "@/views/service-management/service/common.ts"
46
57
const { t } = useI18n()
68
const route = useRoute()
79
810
const tableHeight = computed(() => TableHeight(362))
911
12+
const groupId = ref(route.params.groupId as string)
13+
const serviceId = ref(route.params.serviceId as string)
14+
1015
const isLoading = ref(false)
16+
const isLoadingActivity = ref(false)
1117
const queryInfo = ref<any>({
1218
filter: {
1319
"type": "services",
@@ -28,19 +34,25 @@ const setRowClass = ({ row }) => {
2834
return !row.oldContent && !row.newContent ? "hide-expand-icon" : ""
2935
}
3036
31-
async function getActivities() {
37+
async function search() {
3238
isLoading.value = true
39+
await refreshData(groupId.value, serviceId.value, "activity").finally(() => (isLoading.value = false))
40+
}
41+
42+
async function getActivities() {
43+
isLoadingActivity.value = true
3344
return await activityService
3445
.query(queryInfo.value)
3546
.then(data => {
3647
tableList.value.total = data.total
3748
tableList.value.data = data.list
3849
})
39-
.finally(() => (isLoading.value = false))
50+
.finally(() => (isLoadingActivity.value = false))
4051
}
4152
42-
onMounted(() => {
43-
getActivities()
53+
onBeforeMount(async () => {
54+
await search()
55+
await getActivities()
4456
})
4557
</script>
4658

@@ -53,17 +65,13 @@ onMounted(() => {
5365
</div>
5466
<div class="d-flex gap-1">
5567
<el-text class="f-bold" size="large">{{ t("label.activities") }}</el-text>
56-
<el-button :disabled="isLoading" :title="t('label.refresh')" link type="primary" @click="getActivities()">
57-
<el-icon v-if="!isLoading" :size="20">
58-
<IconMdiRefresh />
59-
</el-icon>
60-
<v-loading v-else />
61-
</el-button>
6268
</div>
69+
<el-button plain size="small" type="success" @click="getActivities()">{{ t("btn.refresh") }}</el-button>
70+
<v-loading v-if="isLoading" />
6371
</div>
6472

6573
<v-table
66-
v-loading="isLoading"
74+
v-loading="isLoadingActivity"
6775
v-model:page-info="queryInfo.pageInfo"
6876
:data="tableList.data"
6977
:max-height="tableHeight"
@@ -85,10 +93,10 @@ onMounted(() => {
8593
</el-table-column>
8694
<el-table-column :label="t('label.description')" min-width="200">
8795
<template #default="scope">
88-
<span v-if="scope.row.instanceName">
89-
{{ t(`activity.service.${scope.row.action}Instance`, { name: scope.row.instanceName }) }}
96+
<span v-if="scope.row.action">
97+
{{ t(`activity.service.${scope.row.action}`, { name: scope.row.instanceName }) }}
9098
</span>
91-
<span v-else>{{ t(`activity.service.${scope.row.action}`) }} </span>
99+
<span v-else>--</span>
92100
</template>
93101
</el-table-column>
94102
<el-table-column :label="t('label.operator')" min-width="140" prop="operator" />

0 commit comments

Comments
 (0)