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

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

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-08 16:01:05 * @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 * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/components/v-labelDiv/index.vue * @FilePath: /data-show/src/components/v-labelDiv/index.vue

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-08 16:44:08 * @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 * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/components/v-ranking/index.vue * @FilePath: /data-show/src/components/v-ranking/index.vue

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

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

@ -1,13 +1,13 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-08 09:17:42 * @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 * @LastEditors: Please set LastEditors
* @Description: 行业洞察 * @Description: 行业洞察
* @FilePath: /data-show/src/views/Index/index.vue * @FilePath: /data-show/src/views/Index/index.vue
--> -->
<template> <template>
<div class="d-container"> <div class="d-container" ref="dc" :style="outStyle" v-resize="handleResize">
<div class="In-body"> <div class="In-body">
<div class="d1"> <div class="d1">
<real-time-event></real-time-event> <real-time-event></real-time-event>
@ -81,6 +81,7 @@ export default {
tbData: [], tbData: [],
tableLoading: false, tableLoading: false,
config: {}, config: {},
outStyle: {},
columns: [ columns: [
{ {
title: "标题", title: "标题",
@ -121,6 +122,32 @@ export default {
this.modalObj.visible = true; 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() { handlerSs() {
}, },

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-08 16:37:30 * @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 * @LastEditors: Please set LastEditors
* @Description: 传播重点阵地 * @Description: 传播重点阵地
* @FilePath: /data-show/src/views/Index/key-communication-positions/index.vue * @FilePath: /data-show/src/views/Index/key-communication-positions/index.vue

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

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-09 10:53:21 * @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 * @LastEditors: Please set LastEditors
* @Description: 传播声量TOP10 * @Description: 传播声量TOP10
* @FilePath: /data-show/src/views/Index/spreadTheSound/index.vue * @FilePath: /data-show/src/views/Index/spreadTheSound/index.vue

Loading…
Cancel
Save