prod
lily.zhang 3 years ago
parent 48ccf248e8
commit 3c5013625f

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-08 08:41:57
* @LastEditTime: 2021-11-02 11:33:36
* @LastEditTime: 2021-11-02 14:10:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/App.vue
@ -21,23 +21,24 @@ export default {
data() {
return {
locale: zhCN,
appStyle: {}
};
},
created() {
// this.changeZoom()
this.changeZoom()
},
methods: {
changeZoom() {
let w = window.screen.width;
let h = document.body.clientHeight; //
let zoom = 1;
if (1300 < w && w <= 1920) {
zoom = w / 1928;
} else if (w < 1300) {
zoom = 1300 / 1928;
if (760 < h && h <= 1080) {
zoom = (h + 120) / 1080;
} else if (h < 760) {
zoom = 760 / 1080;
} else {
zoom = 1;
}
document.body.style.zoom = zoom;
this.appStyle = {transform: `scaleY(${zoom})`}
this.setZoom(zoom);
},
},

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-08 16:01:05
* @LastEditTime: 2021-10-22 09:28:53
* @LastEditTime: 2021-11-02 13:05:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/components/v-labelDiv/index.vue

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-08 16:44:08
* @LastEditTime: 2021-10-29 09:16:21
* @LastEditTime: 2021-11-02 12:44:45
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/components/v-ranking/index.vue

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-13 14:25:26
* @LastEditTime: 2021-10-29 12:53:30
* @LastEditTime: 2021-11-02 15:31:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iLayout/index.vue
@ -12,8 +12,9 @@
<iHeaderMa v-if="getHeaderType == 2"></iHeaderMa>
<iHeaderBrand v-if="getHeaderType == 3"></iHeaderBrand>
<div class="layout-body">
<vue-scroll>
<router-view v-if="isRouterAlive"></router-view>
<router-view v-if="isRouterAlive && !scrollShow"></router-view>
<vue-scroll v-if="scrollShow && isRouterAlive">
<router-view></router-view>
</vue-scroll>
</div>
</div>
@ -24,22 +25,34 @@ export default {
name: "iLayout",
provide() {
return {
reload: this.reload
}
reload: this.reload,
};
},
watch: {
$route: {
handler: function (val) {
if(val.name === 'index') {
this.scrollShow = false;
}
},
//
immediate: true,
},
},
data() {
return {
isRouterAlive: true
}
isRouterAlive: true,
scrollShow: true,
};
},
methods: {
reload() {
this.isRouterAlive = false;
this.$nextTick(() => {
this.isRouterAlive = true;
})
}
}
});
},
},
};
</script>
<style lang="less" scoped>
@ -56,6 +69,6 @@ export default {
.layout-body {
width: 100%;
height: calc(100% - 90px);
overflow: auto;
overflow: hidden;
}
</style>

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:56:13
* @LastEditTime: 2021-11-02 11:19:16
* @LastEditTime: 2021-11-02 13:11:30
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/mixins/index.js
@ -35,6 +35,7 @@ export default {
highly: {
bind(el) { // el为绑定的元素binding为绑定给指令的对象
// console.log(el, "绑定", binding);
let h = ""
function adaptive() {
const style = document.defaultView.getComputedStyle(el); // 获取元素
const wh = document.body.clientHeight;
@ -48,10 +49,12 @@ export default {
} else {
z = 760 / gh
}
el.style.height = z * parseFloat(height) + 'px';
if( h !== style.height) {
el.style.height = z * parseFloat(height) + 'px';
h = style.height;
}
}
adaptive();
adaptive()
// el.__vueSetInterval__ = setInterval(adaptive, 300);
},
unbind(el) {

@ -1,13 +1,13 @@
<!--
* @Author: xw
* @Date: 2021-10-08 09:17:42
* @LastEditTime: 2021-11-02 11:31:33
* @LastEditTime: 2021-11-02 15:12:47
* @LastEditors: Please set LastEditors
* @Description: 行业洞察
* @FilePath: /data-show/src/views/Index/index.vue
-->
<template>
<div class="d-container">
<div class="d-container" ref="dc" :style="outStyle" v-resize="handleResize">
<div class="In-body">
<div class="d1">
<real-time-event></real-time-event>
@ -81,6 +81,7 @@ export default {
tbData: [],
tableLoading: false,
config: {},
outStyle: {},
columns: [
{
title: "标题",
@ -121,6 +122,32 @@ export default {
this.modalObj.visible = true;
});
},
handleResize({height}) {
let h = document.body.clientHeight;
let h2 = parseFloat(height);
let z = 1;
let m = h2 - h;
let marginTop = -m*1.7;
if(h > 760 && h < 1080) {
if(h2 > h) {
z = (h2 + m*2.8) / 1080;
} else {
z = 1;
marginTop = 0;
}
} else if(h <= 760) {
z = 760 / 1080;
} else {
z = 1
marginTop = 0
}
this.outStyle = {
transform: `scaleY(${z}) translate(0, ${marginTop}px)`,
}
},
handlerSs() {
},

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 16:37:30
* @LastEditTime: 2021-11-01 12:01:49
* @LastEditTime: 2021-11-02 13:28:21
* @LastEditors: Please set LastEditors
* @Description: 传播重点阵地
* @FilePath: /data-show/src/views/Index/key-communication-positions/index.vue

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 15:56:35
* @LastEditTime: 2021-11-02 10:03:05
* @LastEditTime: 2021-11-02 13:28:14
* @LastEditors: Please set LastEditors
* @Description: 实时事件
* @FilePath: /data-show/src/views/Index/realTimeEvent/index.vue
@ -10,7 +10,7 @@
<template>
<div class="rte-outter" v-loading="load">
<v-label-div title="实时事件"></v-label-div>
<div class="rte-tb">
<div class="rte-tb" v-highly>
<dv-scroll-board :config="config" :style="{ width: '100%', height: '100%' }" @click="handlerSs"/>
</div>
</div>
@ -73,6 +73,7 @@ export default {
.rte-tb {
padding: 16px;
height: calc(100% - 48px);
overflow: hidden;
}
}
</style>

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-09 10:53:21
* @LastEditTime: 2021-11-01 09:11:41
* @LastEditTime: 2021-11-02 13:29:02
* @LastEditors: Please set LastEditors
* @Description: 传播声量TOP10
* @FilePath: /data-show/src/views/Index/spreadTheSound/index.vue

Loading…
Cancel
Save