diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/Index.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/Index.vue
index 5e4d4d3eb5..f1514725ce 100644
--- a/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/Index.vue
+++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/Index.vue
@@ -240,14 +240,11 @@
window.changeConfirm = true;
};
- const handleDstClusterBatchEdit = (clusterList: SqlserverHaModel[]) => {
- if (clusterList.length > 0) {
- const [clusterItem] = clusterList;
- tableData.value.forEach((item) => {
- Object.assign(item, { dst_cluster: clusterItem });
- });
- window.changeConfirm = true;
- }
+ const handleDstClusterBatchEdit = (value: string) => {
+ tableData.value.forEach((item) => {
+ Object.assign(item.dst_cluster, { master_domain: value });
+ });
+ window.changeConfirm = true;
};
const handleDbTableBatchEdit = (value: string[], field: string) => {
diff --git a/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/components/DstClusterColumn.vue b/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/components/DstClusterColumn.vue
index 01a4d8526f..ee7359e10c 100644
--- a/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/components/DstClusterColumn.vue
+++ b/dbm-ui/frontend/src/views/db-manage/sqlserver/SQLSERVER_ROLLBACK/components/other-cluster/components/DstClusterColumn.vue
@@ -22,12 +22,19 @@
:min-width="300"
required>
-
-
-
+
+
+
+
+
-
void;
+ type Emits = (e: 'batch-edit', value: string) => void;
const props = defineProps();
const emits = defineEmits();
@@ -102,13 +104,8 @@
const { t } = useI18n();
- const isShowHeadClusterSelector = ref(false);
const isShowCellClusterSelector = ref(false);
-
- const headSelected: ComponentProps['selected'] = {
- [ClusterTypes.SQLSERVER_HA]: [],
- [ClusterTypes.SQLSERVER_SINGLE]: [],
- };
+ const showBatchEdit = ref(false);
const clusterSelectorTabConfig = {
[ClusterTypes.SQLSERVER_HA]: {
@@ -200,13 +197,12 @@
},
);
- const handleHeadClusterChange = (selected: { [key: string]: Array }) => {
- const clusterList = Object.values(selected).flatMap((selectedList) => selectedList);
- emits('batch-edit', clusterList);
+ const handleBatchEditChange = (value: string | string[]) => {
+ emits('batch-edit', value as string);
};
- const handleShowHeadClusterSelector = () => {
- isShowHeadClusterSelector.value = true;
+ const handleBatchEditShow = () => {
+ showBatchEdit.value = true;
};
const handleShowClusterSelector = () => {
@@ -220,7 +216,7 @@
};