Browse Source

数据监控接口字段修改

develop
fuguobin 9 months ago
parent
commit
4689c339a2
  1. 4
      src/permission.ts
  2. 1
      src/types/components.d.ts
  3. 6
      src/views/data-visual/index.scss
  4. 4
      src/views/data-visual/index.vue

4
src/permission.ts

@ -54,8 +54,8 @@ router.beforeEach(async (to, from, next) => {
//登录后连接webSocket
const userStorageInfo = sessionStorage.getItem('userInfo');
const userInfo = JSON.parse(userStorageInfo === null ? '' : userStorageInfo);
// const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址
const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址
const wsUrl = `ws://${window.location.host}/ws/websocket/${userInfo.userName}`; //websocket地址
// const wsUrl = `ws://10.10.10.56:9010/websocket/${userInfo.userName}`; //websocket地址
socket.initialize(wsUrl);
next({ ...to, replace: true });
} catch (error) {

1
src/types/components.d.ts

@ -57,7 +57,6 @@ declare module '@vue/runtime-core' {
NInputNumber: typeof import('naive-ui')['NInputNumber']
NMenu: typeof import('naive-ui')['NMenu']
NModal: typeof import('naive-ui')['NModal']
NNumberAnimation: typeof import('naive-ui')['NNumberAnimation']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch']

6
src/views/data-visual/index.scss

@ -1,8 +1,8 @@
@import url('@/assets/fonts/font.css');
.screenContainer {
// position: fixed;
// left: 50%;
// top: 50%;
position: fixed;
left: 50%;
top: 50%;
transform-origin: 0 0;
transition: 0.3s;
color: #fff;

4
src/views/data-visual/index.vue

@ -32,11 +32,11 @@ const baseHeight = 1440;
// * 32:9
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5));
onMounted(() => {
// calcRate();
calcRate();
});
window.addEventListener('resize', () => {
//
// resize();
resize();
});
function calcRate() {
const appRef = screenRef.value;

Loading…
Cancel
Save