From eaa5e5e65ddc180b249285b50bbe40a90ec61c42 Mon Sep 17 00:00:00 2001 From: chaoszhu Date: Fri, 19 Jul 2024 12:04:29 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8Dsocket=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E6=95=B0=E6=8D=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/.eslintrc.js | 2 +- web/src/store/index.js | 13 +- web/src/views/group/index.vue | 23 +- web/src/views/index.vue | 20 +- web/src/views/server/components/host-form.vue | 19 +- web/src/views/server/index.vue | 54 ++-- web/src/views/terminal/index-old.vue | 264 ++++++++++++++++ web/src/views/terminal/index.vue | 281 +++--------------- 8 files changed, 360 insertions(+), 316 deletions(-) create mode 100644 web/src/views/terminal/index-old.vue diff --git a/web/.eslintrc.js b/web/.eslintrc.js index 4e84b1f..8f105df 100644 --- a/web/.eslintrc.js +++ b/web/.eslintrc.js @@ -9,7 +9,7 @@ module.exports = { parser: 'vue-eslint-parser', parserOptions: { // parser: 'babel-eslint', - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { 'jsx': true diff --git a/web/src/store/index.js b/web/src/store/index.js index 84fb1e4..7000824 100644 --- a/web/src/store/index.js +++ b/web/src/store/index.js @@ -29,13 +29,24 @@ const useStore = defineStore({ sessionStorage.clear('token') this.$patch({ token: null }) }, - async getHostList() { + async getMainData() { const { data: groupList } = await $api.getGroupList() const { data: hostList } = await $api.getHostList() + // const { data: sshList } = await $api.getSshList() // console.log('hostList:', hostList) // console.log('groupList:', groupList) this.$patch({ hostList, groupList }) }, + async getHostList() { + const { data: hostList } = await $api.getHostList() + // console.log('hostList:', hostList) + this.$patch({ hostList }) + }, + async getGroupList() { + const { data: groupList } = await $api.getGroupList() + // console.log('groupList:', groupList) + this.$patch({ groupList }) + }, getHostPing() { setTimeout(() => { this.hostList.forEach((item) => { diff --git a/web/src/views/group/index.vue b/web/src/views/group/index.vue index 4ecf255..cb93a86 100644 --- a/web/src/views/group/index.vue +++ b/web/src/views/group/index.vue @@ -122,13 +122,12 @@ + + \ No newline at end of file diff --git a/web/src/views/terminal/index.vue b/web/src/views/terminal/index.vue index 6c13026..123be66 100644 --- a/web/src/views/terminal/index.vue +++ b/web/src/views/terminal/index.vue @@ -1,264 +1,53 @@ - - \ No newline at end of file