diff --git a/src/dashboard-front/src/components/resource-detail/index.vue b/src/dashboard-front/src/components/resource-detail/index.vue
index 9e81b2b21..7c96b3ecb 100644
--- a/src/dashboard-front/src/components/resource-detail/index.vue
+++ b/src/dashboard-front/src/components/resource-detail/index.vue
@@ -654,27 +654,28 @@
-
-
- {{ $t('插件:{name}', { name: plugin.name }) }}
-
-
-
-
-
-
-
-
- {{ plugin.config[key] || "--" }}
-
-
-
-
-
+
+
+
+ {{ $t('插件:{name}', { name: plugin.name }) }}
+
+
+
+
+
+
+
+
+ {{ plugin.config[key] || "--" }}
+
+
+
+
+
+
@@ -883,7 +884,10 @@ const checkDiff = (path: any) => {
// );
// };
-const checkPluginsDiff = () => {};
+const checkPluginsDiff = () => {
+ const keys = Object.keys(diffMap.value);
+ return keys.some(item => item.startsWith('localData.plugins'));
+};
// 网关标签
const labels = computed(() => common.gatewayLabels || []);
@@ -1041,6 +1045,11 @@ initLocalData();
}
}
+.container-diff {
+ background: rgba(255, 156, 1, 0.1);
+ padding: 2px 8px;
+ margin: 18px 0;
+}
.ag-kv-box {
&.box-diff {
background: #fbf4e9;
diff --git a/src/dashboard-front/src/views/resource/setting/index.vue b/src/dashboard-front/src/views/resource/setting/index.vue
index ac4a1c94d..a4848c8bb 100644
--- a/src/dashboard-front/src/views/resource/setting/index.vue
+++ b/src/dashboard-front/src/views/resource/setting/index.vue
@@ -209,6 +209,12 @@
:label="t('标签')"
:show-overflow-tooltip="false"
prop="labels"
+ :filter="{
+ list: labelsList,
+ checked: chooseLabels,
+ filterFn: handleMethodFilter,
+ btnSave: false,
+ }"
width="180">
@@ -530,7 +536,7 @@ const route = useRoute();
const router = useRouter();
const chooseMethod = ref([]);
const filterData = ref({ keyword: '', order_by: '' });
-
+const chooseLabels = ref([]);
const tableEmptyConf = ref({
keyword: '',
isAbnormal: false,
@@ -721,6 +727,16 @@ const tableDataKey = ref(-1);
// }
// };
+const labelsList = computed(() => {
+ tableDataKey.value = +new Date();
+ return labelsData.value?.map((item: any) => {
+ return {
+ text: item.name,
+ value: item.id,
+ };
+ });
+});
+
// 列表hooks
const {
tableData,
@@ -757,15 +773,17 @@ const handleClearFilterKey = () => {
filterData.value = cloneDeep({ keyword: '', order_by: '' });
searchValue.value = [];
chooseMethod.value = [];
+ chooseLabels.value = [];
};
const updateTableEmptyConfig = () => {
tableEmptyConf.value.isAbnormal = pagination.value.abnormal;
- if ((searchValue.value.length || chooseMethod.value?.length) && !tableData.value.length) {
+ if ((searchValue.value.length || chooseMethod.value?.length || chooseLabels.value?.length)
+ && !tableData.value.length) {
tableEmptyConf.value.keyword = 'placeholder';
return;
}
- if (searchValue.value.length || chooseMethod.value?.length) {
+ if (searchValue.value.length || chooseMethod.value?.length || chooseLabels.value?.length) {
tableEmptyConf.value.keyword = '$CONSTANT';
return;
}
@@ -1271,6 +1289,18 @@ watch(
},
);
+watch(
+ () => chooseLabels.value,
+ (v) => {
+ if (!v?.length) { // 重置
+ filterData.value.label_ids = undefined;
+ } else { // 选择
+ filterData.value.label_ids = v?.join(',');
+ }
+ },
+ { deep: true, immediate: true },
+);
+
watch(
() => chooseMethod.value,
(v) => {
diff --git a/src/dashboard-front/src/views/stage/overview/detail-mode/resource-info.vue b/src/dashboard-front/src/views/stage/overview/detail-mode/resource-info.vue
index 278075612..982f97daa 100644
--- a/src/dashboard-front/src/views/stage/overview/detail-mode/resource-info.vue
+++ b/src/dashboard-front/src/views/stage/overview/detail-mode/resource-info.vue
@@ -189,7 +189,7 @@ const labels = ref([]);
// 网关id
const apigwId = computed(() => common.apigwId);
-const isLoading = ref(false);
+const isLoading = ref(true);
const pagination = ref({
current: 1,
@@ -327,6 +327,11 @@ watch(
);
const getPageData = () => {
+ if (!resourceVersionList.value?.length) {
+ pagination.value.count = 0;
+ return [];
+ }
+
isLoading.value = true;
let curAllData = resourceVersionList.value;
if (searchValue.value) {