diff --git a/src/components/LargeScreen/index.vue b/src/components/LargeScreen/index.vue index 54b4608..5a2d4d9 100644 --- a/src/components/LargeScreen/index.vue +++ b/src/components/LargeScreen/index.vue @@ -43,7 +43,7 @@ export default { this.currentTime = `${hours}:${minutes}:${seconds}`; }, backToHome() { - this.$router.push('/largeScreen').then(() => { + this.$router.push('/index').then(() => { localStorage.clear(); }); }, diff --git a/src/permission.js b/src/permission.js index 4beb2c5..37af957 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,7 +8,7 @@ import { isRelogin } from '@/utils/request' NProgress.configure({ showSpinner: false }) -const whiteList = ['/login', '/updateFace','/largeScreen','/updateIDCard','/Violation','/Text','/Video','/askRequest','/radar'] +const whiteList = ['/login', '/updateFace','/index','/updateIDCard','/Violation','/Text','/Video','/askRequest','/radar'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/src/router/index.js b/src/router/index.js index 3acdfbd..74c4d8d 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -41,7 +41,7 @@ export const constantRoutes = [ hidden: true }, { - path: '/largeScreen', + path: '/index', component: () => import('@/views/largeScreen/largeScreen'), hidden: true }, diff --git a/src/views/Text/textrecognition.vue b/src/views/Text/textrecognition.vue index 477dd1b..56c2c82 100644 --- a/src/views/Text/textrecognition.vue +++ b/src/views/Text/textrecognition.vue @@ -75,7 +75,7 @@ export default { methods: { backToHome() { this.$router.beforeEach((to, from, next) => { - if (from.path === '/largeScreen') { + if (from.path === '/index') { // 清除缓存的操作 // 可以使用 localStorage.clear() 或其他方法清除缓存 localStorage.clear(); @@ -84,7 +84,7 @@ export default { }); // 跳转到主页 - this.$router.push('/largeScreen'); + this.$router.push('/index'); }, handup() { alert(1) diff --git a/src/views/askRequest/askRequest.vue b/src/views/askRequest/askRequest.vue index 58c70b9..2770754 100644 --- a/src/views/askRequest/askRequest.vue +++ b/src/views/askRequest/askRequest.vue @@ -175,7 +175,9 @@ export default { deleteChatWindow(windowId).then(res => { if (res.code === 200) { this.$message.success("删除成功"); // 显示删除成功的提示信息 - this.getList(); // 重新获取窗口列表 + this.getList(); + /* this.answerList = [];*/ + this.generateNewWindowId();// 重新获取窗口列表 } }); }, @@ -188,6 +190,10 @@ export default { // 提交输入内容 submitInput() { + if (this.isAncestor) { + this.$message.warning("问答进行中"); + return; + } if (this.answerList.length === 0) { // 如果当前窗口没有聊天记录,插入一个新的聊天窗口 insertChatWindow({windowName: this.inputValue, windowId: this.windowId}).then(res => { diff --git a/src/views/largeScreen/routeIcon.vue b/src/views/largeScreen/routeIcon.vue index ca7fe60..8c2e610 100644 --- a/src/views/largeScreen/routeIcon.vue +++ b/src/views/largeScreen/routeIcon.vue @@ -42,15 +42,6 @@