|
@@ -125,7 +125,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #nodeName="{ record }">
|
|
<template #nodeName="{ record }">
|
|
|
- <a-tag color="gray">{{ record.end_point }} - {{ record.nodeName }} </a-tag>
|
|
|
|
|
|
|
+ <a-tag color="gray" @click="changePublicIp(record.nodeName)">{{ record.end_point }} - {{ record.nodeName }} </a-tag>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template #suspended_endpoint="{ record }">
|
|
<template #suspended_endpoint="{ record }">
|
|
@@ -281,6 +281,7 @@ import { useI18n } from 'vue-i18n';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import useLoading from '@/hooks/loading';
|
|
import useLoading from '@/hooks/loading';
|
|
|
import { queryTkPool, TkPoolRecord, TkPoolParams, TkUpdateAccountModel, TkUpdateAccount } from '@/api/taobao';
|
|
import { queryTkPool, TkPoolRecord, TkPoolParams, TkUpdateAccountModel, TkUpdateAccount } from '@/api/taobao';
|
|
|
|
|
+import { changePublicIpByName } from '@/api/proxy';
|
|
|
import { Pagination } from '@/types/global';
|
|
import { Pagination } from '@/types/global';
|
|
|
import { Modal, Message } from '@arco-design/web-vue';
|
|
import { Modal, Message } from '@arco-design/web-vue';
|
|
|
import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface';
|
|
import type { SelectOptionData } from '@arco-design/web-vue/es/select/interface';
|
|
@@ -568,6 +569,34 @@ const changeAttr = async (id: number, name: string, val: any) => {
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+const changePublicIp = async (nodeName: string) => {
|
|
|
|
|
+ Modal.confirm({
|
|
|
|
|
+ title: '确认提示',
|
|
|
|
|
+ content: `确定要更改节点 ${nodeName} 的公网IP吗?`,
|
|
|
|
|
+ okText: '确认',
|
|
|
|
|
+ cancelText: '取消',
|
|
|
|
|
+ async onOk() {
|
|
|
|
|
+ setLoading(true);
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ const { data } = await changePublicIpByName(nodeName);
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ const msg = data.msg || '更新IP成功!';
|
|
|
|
|
+ if (data.success) {
|
|
|
|
|
+ Message.success(msg);
|
|
|
|
|
+ fetchData();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ Message.error(data.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.log(e);
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ setLoading(false);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -699,3 +728,7 @@ export default {
|
|
|
background-color: var(--color-warning-light-2) !important;
|
|
background-color: var(--color-warning-light-2) !important;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|