-
{{ $t('是否下架 {n} 模块', { n: curOperationAppData.module_name }) }}
+
+ {{ $t('是否下架 {n} 模块', { n: curOperationAppData.module_name }) }}
+
{{ $t('将模块从') }}
{{ curOperationAppData.env_name === 'stag' ? $t('预发布环境') : $t('生产环境') }}
@@ -83,13 +99,15 @@
size="small"
class="mr4"
:loading="isPopoverLoading"
- @click="handleConfirm('offlineApp', `removed${childRow.env_name}-${childRow.module_name}`)">
+ @click="handleConfirm('offlineApp', `removed${childRow.env_name}-${childRow.module_name}`)"
+ >
{{ $t('确定') }}
+ @click="handleCancel(`removed${childRow.env_name}-${childRow.module_name}`)"
+ >
{{ $t('取消') }}
@@ -103,12 +121,14 @@
trigger="click"
width="260"
:on-hide="handleHide"
- ext-cls="idle-popover-cls">
+ ext-cls="idle-popover-cls"
+ >
+ @click="handleShowPopover(childRow, props.row)"
+ >
{{ $t('忽略') }}
@@ -126,13 +146,15 @@
size="small"
class="mr4"
:loading="isPopoverLoading"
- @click="handleConfirm('ignoreModule', `ignore${childRow.env_name}-${childRow.module_name}`)">
+ @click="handleConfirm('ignoreModule', `ignore${childRow.env_name}-${childRow.module_name}`)"
+ >
{{ $t('忽略') }}
+ @click="handleCancel(`ignore${childRow.env_name}-${childRow.module_name}`)"
+ >
{{ $t('取消') }}
@@ -143,22 +165,33 @@
-
+
-
-
{{ row.name }}({{ row.code }})
+
+
+ {{ row.name }}
+ ({{ row.code }})
+
+ class-name="env-column-cls"
+ >
+ ext-cls="idle-popover-cls"
+ >
+ @click="handleLeaveApp(row)"
+ >
{{ $t('退出应用') }}
@@ -185,13 +220,15 @@
size="small"
class="mr4"
:loading="isPopoverLoading"
- @click="confirmLeaveApp(`quit${row.code}`)">
+ @click="confirmLeaveApp(`quit${row.code}`)"
+ >
{{ $t('确定') }}
+ @click="handleCancel(`quit${row.code}`)"
+ >
{{ $t('取消') }}
@@ -252,8 +289,8 @@ export default {
const res = await this.$store.dispatch('baseInfo/getIdleAppList');
// 该应用无模块,则无需展示
this.idleAppList = res.applications
- .filter(app => app.module_envs.length)
- .map(item => ({
+ .filter((app) => app.module_envs.length)
+ .map((item) => ({
...item,
staffList: [...item.administrators, ...item.developers],
}));
@@ -288,7 +325,8 @@ export default {
arraySpanMethod({ columnIndex }) {
if (columnIndex === 2) {
return [1, 5];
- } if (columnIndex >= 3 && columnIndex <= 5) {
+ }
+ if (columnIndex >= 3 && columnIndex <= 5) {
return [0, 0];
}
},
@@ -345,7 +383,10 @@ export default {
} catch (e) {
this.$paasMessage({
theme: 'error',
- message: e.detail || e.message || (name === 'offlineApp' ? this.$t('下架失败,请稍候再试') : this.$t('忽略失败,请稍候再试')),
+ message:
+ e.detail ||
+ e.message ||
+ (name === 'offlineApp' ? this.$t('下架失败,请稍候再试') : this.$t('忽略失败,请稍候再试')),
});
} finally {
this.isPopoverLoading = false;
@@ -407,10 +448,10 @@ export default {
vertical-align: middle;
}
.code {
- color: #979BA5;
+ color: #979ba5;
}
.info:hover {
- color: #3A84FF;
+ color: #3a84ff;
}
}
@@ -420,16 +461,21 @@ export default {
:deep(.idle-app-dashboard-table) {
.bk-table-body-wrapper .idle-table-row-cls {
- background: #F0F1F5;
+ background: #f0f1f5;
}
tr.expanded .bk-table-expand-icon .bk-icon {
- color: #63656E;
+ color: #63656e;
}
.bk-table-expand-icon .bk-icon {
- color: #979BA5;
+ color: #979ba5;
}
- .child-module-table-cls .bk-table-header-wrapper {
- display: none;
+ .child-module-table-cls {
+ .bk-table-header-wrapper {
+ display: none;
+ }
+ .bk-table-body-wrapper {
+ color: #63656e;
+ }
}
.env-column-cls .cell {
display: flex;
diff --git a/webfe/package_vue/src/views/dev-center/home/home-content/index.vue b/webfe/package_vue/src/views/dev-center/home/home-content/index.vue
index 639f94ae88..de59d4db8c 100644
--- a/webfe/package_vue/src/views/dev-center/home/home-content/index.vue
+++ b/webfe/package_vue/src/views/dev-center/home/home-content/index.vue
@@ -81,13 +81,15 @@ export default {
if (this.platformFeature.MONITORING) {
return this.panels;
}
- return this.panels.filter(item => item.name !== 'alarm');
+ return this.panels.filter((item) => item.name !== 'alarm');
},
appChartInfo() {
return this.$store.state.baseInfo.appChartData;
},
emptyTips() {
- return this.$t('您当前共管理 {n} 个应用,无任何应用处于告警或闲置状态,请继续保持!', { n: this.appChartInfo?.allCount });
+ return this.$t('您当前共管理 {n} 个应用,无任何应用处于告警或闲置状态,请继续保持!', {
+ n: this.appChartInfo?.allCount,
+ });
},
},
watch: {
@@ -95,7 +97,7 @@ export default {
if (newPanels.length) {
this.handleTabClick(newPanels[0]);
}
- }
+ },
},
mounted() {
this.updateContainerHeight();
@@ -103,8 +105,14 @@ export default {
// 创建一个 ResizeObserver 实例
this.resizeObserver = new ResizeObserver((entries) => {
for (const entry of entries) {
- // 列表元素高度同步到右侧操作记录
- this.contentHeight = entry.contentRect.height + 32;
+ const newHeight = entry.contentRect.height;
+
+ // 如果高度发生变化
+ if (newHeight !== this.contentHeight - 32) {
+ window.requestAnimationFrame(() => {
+ this.contentHeight = newHeight + 32;
+ });
+ }
}
});
this.resizeObserver.observe(this.$refs.tabContent);
@@ -129,11 +137,11 @@ export default {
const { name, length } = data;
if (length === 0) {
// 移除对应的 tab 项
- this.panels = this.panels.filter(panel => panel.name !== name);
+ this.panels = this.panels.filter((panel) => panel.name !== name);
this.active = this.panels[0].name;
} else {
// 确保在 length > 0 时,该 tab 存在于 panels 中
- if (!this.panels.some(panel => panel.name === name)) {
+ if (!this.panels.some((panel) => panel.name === name)) {
this.isLoading = true;
if (name === 'idle') {
this.panels.unshift({ name: 'idle', label: this.$t('闲置应用') });
@@ -221,6 +229,6 @@ export default {
/deep/ .no-data .empty-tips i {
font-style: normal;
font-weight: 700;
- color: #3A84FF;
+ color: #3a84ff;
}