diff --git a/README.md b/README.md
index d69a115..23877c5 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Nuxt 3 Minimal Starter
+# QimenIDC-Client-V2
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
diff --git a/locales/zh.json b/locales/zh.json
index 85c557e..89d4b5a 100644
--- a/locales/zh.json
+++ b/locales/zh.json
@@ -197,10 +197,15 @@
"Cancel": "取消",
"Add": "添加",
"List of administrator accounts": "管理员账户列表",
- "name": "姓名",
+ "name": "名称",
"phone": "电话",
"email": "邮箱",
"delete": "删除",
"You will not be able to recover this account!": "您将无法恢复此账户!",
"Your account is safe :)": "您的账户是安全的,并未删除 :)",
+ "host": "主机",
+ "port": "端口",
+ "domain": "域名",
+ "You will not be able to recover this VNC!": "您将无法恢复此VNC!",
+ "Your VNC is safe :)": "您的VNC是安全的,并未删除 :)",
}
diff --git a/pages/node/vnc.vue b/pages/node/vnc.vue
index 0c0fd1e..8105280 100644
--- a/pages/node/vnc.vue
+++ b/pages/node/vnc.vue
@@ -13,9 +13,563 @@
{{$t('VNC controller')}}
+
+
+
{{ $t('API management') }}
+
+
+
+
+
+
+
+
+ {{$t('ID')}} |
+ {{$t('name')}} |
+ {{$t('host')}} |
+ {{$t('port')}} |
+ {{$t('domain')}} |
+ {{$t('Status')}} |
+ {{$t('CreateTime')}} |
+ {{$t('Action')}} |
+
+
+
+
+ {{ row.id }} |
+ {{ row.name }} |
+ {{ row.host }} |
+ {{ row.port }} |
+ {{ row.domain }} |
+
+
+
+ {{ $t('Activated') }}
+
+ {{ $t('Disabled') }}
+
+
+ |
+ {{ row.createDate }} |
+
+
+
+
+
+
+ |
+
+
+
+ {{ $t('No data available in table') }} |
+
+
+
+
+
+
+ {{ $t('Show') }}
+
+ {{ $t('entries') }}
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/system/account.vue b/pages/system/account.vue
index 702fbd5..3a082fe 100644
--- a/pages/system/account.vue
+++ b/pages/system/account.vue
@@ -452,7 +452,7 @@
editMod.value = false;
getUserList();
} else {
- showMessage(res.msg, 'error');
+ showMessage(res.message, 'error');
}
};
@@ -473,7 +473,7 @@
increaseMod.value = false;
getUserList();
} else {
- showMessage(res.msg, 'error');
+ showMessage(res.message, 'error');
}
};
@@ -502,7 +502,7 @@
showMessage(t('Deleted successfully.'));
getUserList();
} else {
- showMessage(res.msg, 'error');
+ showMessage(res.message, 'error');
}
};
diff --git a/server/api/vncList.ts b/server/api/vncList.ts
new file mode 100644
index 0000000..462db16
--- /dev/null
+++ b/server/api/vncList.ts
@@ -0,0 +1,89 @@
+import Http from '@/utils/http'
+import Swal from 'sweetalert2';
+
+export default new class VncList extends Http {
+ /**
+ * 获取VNC列表
+ * @param page 页码
+ * @param size 每页数量
+ * @returns VNC列表
+ * @throws {Error} 请求失败
+ **/
+ async getVncList(page: number, size: number) {
+ try {
+ const response = await this.get('/selectVncNodePage', { page, size });
+ return response;
+ } catch (error) {
+ console.error('Error fetching VNC list:', error);
+ Swal.fire({
+ icon: 'error',
+ title: 'Oops...',
+ text: 'Failed to fetch VNC list!',
+ });
+ throw error; // 重新抛出错误,以便其他地方处理
+ }
+ }
+
+ /**
+ * 删除VNC
+ * @param id VNC ID
+ * @returns 删除结果
+ * @throws {Error} 请求失败
+ **/
+ async deleteVnc(id: number) {
+ try {
+ const response = await this.delete('/deleteVncNode?id=' + id);
+ return response;
+ } catch (error) {
+ console.error('Error deleting VNC:', error);
+ Swal.fire({
+ icon: 'error',
+ title: 'Oops...',
+ text: 'Failed to delete VNC!',
+ });
+ throw error;
+ }
+ }
+
+ /**
+ * 添加VNC控制器
+ * @param body 请求体
+ * @returns 添加结果
+ * @throws {Error} 请求失败
+ **/
+ async addVnc(body: any) {
+ try {
+ const response = await this.post('/addVncNode', body);
+ return response;
+ } catch (error) {
+ console.error('Error adding VNC:', error);
+ Swal.fire({
+ icon: 'error',
+ title: 'Oops...',
+ text: 'Failed to add VNC!',
+ });
+ throw error;
+ }
+ }
+
+ /**
+ * 修改VNC控制器
+ * @param body 请求体
+ * @returns 修改结果
+ * @throws {Error} 请求失败
+ **/
+ async updateVnc(body: any) {
+ try {
+ const response = await this.post('/updateVncNode', body);
+ return response;
+ } catch (error) {
+ console.error('Error updating VNC:', error);
+ Swal.fire({
+ icon: 'error',
+ title: 'Oops...',
+ text: 'Failed to update VNC!',
+ });
+ throw error;
+ }
+ }
+}
\ No newline at end of file
diff --git a/server/index.ts b/server/index.ts
index ed0af41..12d5972 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -3,6 +3,7 @@ import loginApi from '@/server/api/login'
import apiList from '@/server/api/apiList'
import setting from '@/server/api/setting'
import account from '@/server/api/account'
+import vncList from '@/server/api/vncList'
export default {
statusApi,
@@ -10,4 +11,5 @@ export default {
apiList,
setting,
account,
+ vncList,
}
\ No newline at end of file