diff --git a/.env.development b/.env.development index d7eb731..d4a7081 100644 --- a/.env.development +++ b/.env.development @@ -2,6 +2,7 @@ ENV = 'development' # base api +VUE_APP_WEBSOCKET = 'http://localhost:8088' VUE_APP_BASE_API = '/api' VUE_APP_BASE_FILE_API = '/file' VUE_APP_BASE_PRIVIEW_API = '/priview' diff --git a/.env.production b/.env.production index fe53a1d..d1d8129 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,7 @@ ENV = 'production' # base api +VUE_APP_WEBSOCKET = 'http://www.jmal.cloud:8088' VUE_APP_BASE_API = '/api' VUE_APP_BASE_FILE_API = '/file' VUE_APP_BASE_PRIVIEW_API = '/priview' diff --git a/.env.staging b/.env.staging index 21aecf0..2e027b1 100644 --- a/.env.staging +++ b/.env.staging @@ -4,6 +4,7 @@ NODE_ENV = production ENV = 'staging' # base api +VUE_APP_WEBSOCKET = 'http://localhost:8088' VUE_APP_BASE_API = '/api' VUE_APP_BASE_FILE_API = '/file' VUE_APP_BASE_PRIVIEW_API = '/priview' diff --git a/package.json b/package.json index 1750ed4..44af237 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "scriptjs": "^2.5.9", "sortablejs": "^1.10.2", "spark-md5": "^3.0.0", + "stompjs": "^2.3.3", "v-contextmenu": "^2.9.0", "v-viewer": "^1.5.1", "vant": "2.5.0", diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index 9d90dcd..5208315 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -447,8 +447,10 @@ import '@/utils/directives.js' import 'pl-table/themes/index.css'; - // import 'pl-table/themes/plTableStyle.css'; import { PlTable, PlTableColumn } from 'pl-table'; + + // import ws from '@/websocket/websocket_config'; + var rowStyleExecuting = false export default { name: 'ShowFile', @@ -762,6 +764,9 @@ // 画矩形选区 this.darwRectangle() + + // 监听websocket + this.onmessage() }, destroyed() { window.removeEventListener('popstate', this.goBack, false); @@ -799,6 +804,14 @@ } }, methods: { + onmessage(){ + // if(ws.isConnected){ + // // 订阅系统数据 + // this.stompClient = ws.stompClient.subscribe('/topic/updateData', (msg) => { + // console.log('/topic/updateData',msg) + // },ws.headers); + // } + }, load () { this.getFileList(true) }, diff --git a/src/components/preview/SimTextPreview.vue b/src/components/preview/SimTextPreview.vue index 94f7c65..12d379c 100644 --- a/src/components/preview/SimTextPreview.vue +++ b/src/components/preview/SimTextPreview.vue @@ -15,7 +15,7 @@
{{file.name}}
- 保存所有 + 保存所有