From 9a9bd5273a0a5885834ee80dcb7fdd69013450b0 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期五, 01 十一月 2024 18:01:01 +0800 Subject: [PATCH] 测试完成 --- src/views/repositoryai/templateku/configurat/measurement.vue | 10 ++++++---- src/store/modules/user.js | 4 +++- vue.config.js | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 932aa9d..714790e 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -88,6 +88,8 @@ }, SET_Id: (state, Id) => { state.Id = Id + console.log(state.Id,'user2'); + }, SET_AVATAR: (state, avatar) => { state.avatar = avatar @@ -131,7 +133,6 @@ GetInfo({ commit, state }) { return new Promise((resolve, reject) => { getInfo().then(res => { - console.log(res.user,'user'); const user = res.user const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; @@ -142,6 +143,7 @@ commit('SET_ROLES', ['ROLE_DEFAULT']) } commit('SET_NAME', user.userName) + console.log(user.userId,'user1'); commit('SET_Id', user.userId) commit('SET_leavehospitaldistrictcodes', user.belongWards) commit('SET_leaveldeptcodes', user.belongDepts) diff --git a/src/views/repositoryai/templateku/configurat/measurement.vue b/src/views/repositoryai/templateku/configurat/measurement.vue index e9aca3d..a1b07bd 100644 --- a/src/views/repositoryai/templateku/configurat/measurement.vue +++ b/src/views/repositoryai/templateku/configurat/measurement.vue @@ -122,6 +122,8 @@ created() { this.TemplateName = this.$route.query.name; this.userid = store.getters.Id; + console.log(store.getters.Id,'11'); + this.requstWs(); //杩涘叆椤甸潰鍒涘缓杩炴帴 }, mounted() { @@ -162,7 +164,7 @@ }; // 鍙戣捣ws璇锋眰 sendWebsocket( - "ws://192.168.2.10:8095/chat?userId="+this.userId, + "ws://192.168.2.13:8095/chat?userId="+this.userid, obj, this.wsMessage, this.wsError @@ -230,14 +232,14 @@ // 娑堟伅鍙戦�� const obj = { type: "text", - userId: this.userId, + userId: this.userid, templateId: "", questionMessage: { content: this.answer }, }; console.log(obj, "鍏ュ弬"); // 鍙戣捣ws璇锋眰 sendWebsocket( - "ws://192.168.2.10:8095/chat?userId="+this.userId, + "ws://192.168.2.13:8095/chat?userId="+this.userids, obj, this.wsMessage, this.wsError @@ -284,7 +286,7 @@ overflow: auto; .leftside { margin-bottom: 30px; - width: 600px; + max-width: 566px; margin-left: 20px; padding: 10px; color: #fff; diff --git a/vue.config.js b/vue.config.js index 8c61438..9007899 100644 --- a/vue.config.js +++ b/vue.config.js @@ -36,7 +36,7 @@ // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { // target: `http://192.168.168.60:8095`, - target: `http://192.168.2.10:8095`, + target: `http://192.168.2.13:8095`, // target:`http://localhost:8095`, // target: `http://192.168.101.135:8095`, // target: `http://192.168.101.166:8093`, -- Gitblit v1.9.3