prod
lily.zhang 3 years ago
parent 4f59ed78db
commit 2580312021

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-08 08:41:57
* @LastEditTime: 2021-11-02 14:10:14
* @LastEditTime: 2021-11-05 10:27:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/App.vue

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-13 14:25:26
* @LastEditTime: 2021-11-03 11:12:39
* @LastEditTime: 2021-11-05 10:44:00
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iLayout/index.vue
@ -12,9 +12,8 @@
<iHeaderMa v-if="getHeaderType == 2"></iHeaderMa>
<iHeaderBrand v-if="getHeaderType == 3"></iHeaderBrand>
<div class="layout-body">
<router-view v-if="isRouterAlive && !scrollShow" @changeZoom="changeZoom"></router-view>
<vue-scroll v-if="scrollShow && isRouterAlive">
<router-view></router-view>
<vue-scroll>
<router-view v-if="isRouterAlive"></router-view>
</vue-scroll>
</div>
</div>
@ -28,23 +27,9 @@ export default {
reload: this.reload,
};
},
watch: {
$route: {
handler: function (val) {
if(val.name === 'index') {
this.scrollShow = false;
} else {
this.scrollShow = true;
}
},
//
immediate: true,
},
},
data() {
return {
isRouterAlive: true,
scrollShow: true,
headerStyle: {}
};
},
@ -74,7 +59,7 @@ export default {
}
.layout-body {
width: 100%;
height: calc(100% - 90px);
height: calc(100% - 80px);
overflow: hidden;
}
</style>

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:56:13
* @LastEditTime: 2021-11-03 17:03:23
* @LastEditTime: 2021-11-05 11:38:47
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/mixins/index.js
@ -31,6 +31,18 @@ function detectZoom (){
return ratio;
}
function adaptive(el,z) {
const style = document.defaultView.getComputedStyle(el); // 获取元素
const wh = document.body.clientHeight;
let h = style.height;
if(wh >= 760) {
el.style.height = z * parseFloat(h) + 'px';
}
// if( h !== style.height) {
// el.style.height = z * parseFloat(height) + 'px';
// h = style.height;
// }
}
export default {
install(Vue) {
Vue.mixin({
@ -56,33 +68,12 @@ 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;
const height = style.height;
let z = 1;
let gh = 1080;
if(wh >= gh) {
z = 1;
} else if(wh >= 760 && wh < gh) {
z = wh / gh
} else {
z = 760 / gh
}
if( h !== style.height) {
el.style.height = z * parseFloat(height) + 'px';
h = style.height;
}
}
adaptive()
bind(el, binding) { // el为绑定的元素binding为绑定给指令的对象
adaptive(el, binding.value)
// el.__vueSetInterval__ = setInterval(adaptive, 300);
},
unbind(el) {
// console.log(el, "解绑");
clearInterval(el.__vueSetInterval__);
inserted(el, binding) {
adaptive(el, binding.value)
}
}
},

@ -1,13 +1,13 @@
<!--
* @Author: xw
* @Date: 2021-10-09 11:28:39
* @LastEditTime: 2021-11-01 19:10:58
* @LastEditTime: 2021-11-05 11:41:08
* @LastEditors: Please set LastEditors
* @Description: 晴雨表
* @FilePath: /data-show/src/views/Index/barometer/index.vue
-->
<template>
<div class="bm-outter" v-loading="load">
<div class="bm-outter" v-loading="load" v-highly="0.83">
<v-label-div title="晴雨表">
<div class="tis">
<v-pagination :data="pdata" :style="{marginRight: '0.8rem', marginTop: '0.4rem'}" @change="handlerData"></v-pagination>

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-09 14:25:05
* @LastEditTime: 2021-11-01 11:37:58
* @LastEditTime: 2021-11-05 11:24:18
* @LastEditors: Please set LastEditors
* @Description: 大数据统计gif
* @FilePath: /data-show/src/views/Index/dynamicNumber/index.vue

@ -1,13 +1,13 @@
<!--
* @Author: xw
* @Date: 2021-10-09 13:25:49
* @LastEditTime: 2021-11-01 09:10:10
* @LastEditTime: 2021-11-05 11:45:26
* @LastEditors: Please set LastEditors
* @Description: 热议图谱
* @FilePath: /data-show/src/views/Index/hotDiscussionGraph/index.vue
-->
<template>
<div class="hdg-ouuter" v-loading="load">
<div class="hdg-ouuter" v-loading="load" v-highly="0.83">
<v-label-div title="热议图谱">
<v-tab-group :btns="['热门', '正面', '负面']" @change="handlerChange"></v-tab-group>
</v-label-div>

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 09:17:42
* @LastEditTime: 2021-11-03 10:54:35
* @LastEditTime: 2021-11-05 11:43:01
* @LastEditors: Please set LastEditors
* @Description: 行业洞察
* @FilePath: /data-show/src/views/Index/index.vue
@ -15,7 +15,7 @@
<spread-the-sound></spread-the-sound>
</div>
<div class="d2">
<div class="d2-top">
<div class="d2-top" v-highly="0.917">
<dynamic-number @allData="handlerAllData"></dynamic-number>
</div>
<div class="d2-bottom">
@ -123,32 +123,17 @@ export default {
});
},
handleResize({height}) {
let h = document.body.clientHeight;
let h2 = parseFloat(height);
let hx = 990/1080 * h;
let z = 1;
let m = h2 - h;
let marginTop = -m*1.9;
if(h > 760 && h < 1080) {
if(h2 > h) {
z = hx/h2 * 0.99;
} else {
z = 1;
marginTop = 0;
}
} else if(h <= 760) {
z = 760 / 1080;
} else {
z = 1
marginTop = 0
}
let hb = document.body.scrollHeight; //
let hx = parseFloat(height);
let hs = document.body.clientHeight; //
console.log('hb:'+hb)
console.log('hx:'+hx)
console.log('hs:'+hs)
this.outStyle = {
transform: `scaleY(${z}) translate(0, ${marginTop}px)`,
}
this.$emit('changeZoom', z)
// this.outStyle = {
// transform: `scaleY(${z}) translate(0, ${marginTop}px)`,
// }
// this.$emit('changeZoom', z)
},
handlerSs() {

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

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

@ -1,13 +1,13 @@
<!--
* @Author: xw
* @Date: 2021-10-08 18:58:00
* @LastEditTime: 2021-11-01 09:13:54
* @LastEditTime: 2021-11-05 11:44:29
* @LastEditors: Please set LastEditors
* @Description: 热销排行
* @FilePath: /data-show/src/views/Index/salesRank/index.vue
-->
<template>
<div class="sr-outter" v-loading="load">
<div class="sr-outter" v-loading="load" v-highly="0.83">
<v-label-div title="热销排行">
<div class="tis">
<v-pagination :data="pdata" :style="{marginRight: '0.8rem', marginTop: '0.4rem'}" @change="handlerPage"></v-pagination>

@ -1,13 +1,13 @@
<!--
* @Author: xw
* @Date: 2021-10-09 10:53:21
* @LastEditTime: 2021-11-02 13:29:02
* @LastEditTime: 2021-11-05 11:39:22
* @LastEditors: Please set LastEditors
* @Description: 传播声量TOP10
* @FilePath: /data-show/src/views/Index/spreadTheSound/index.vue
-->
<template>
<div class="st-outter" v-loading="load">
<div class="st-outter" v-loading="load" v-highly="0.83">
<v-label-div title="传播声量TOP10">
<div class="tis">
<v-pagination :data="pdata" :style="{marginRight: '0.8rem', marginTop: '0.4rem'}" @change="handlerData"></v-pagination>

@ -1,14 +1,14 @@
<!--
* @Author: xw
* @Date: 2021-10-09 11:56:50
* @LastEditTime: 2021-10-29 14:32:06
* @LastEditTime: 2021-11-05 11:41:27
* @LastEditors: Please set LastEditors
* @Description: 尾翼洞察
* @FilePath: /data-show/src/views/Index/tailInsight/index.vue
-->
<template>
<div class="tl-outter" v-loading="load">
<div class="tl-outter" v-loading="load" v-highly="0.83">
<vLabel-div title="尾翼洞察">
<div class="tis">
<v-pagination :data="pdata" :style="{marginRight: '0.8rem', marginTop: '0.4rem'}" @change="handlerData"></v-pagination>

Loading…
Cancel
Save