prod
lily.zhang 3 years ago
parent 2f6c5bef65
commit 84326f28d8

@ -1,14 +1,14 @@
<!--
* @Author: your name
* @Date: 2021-10-08 16:01:05
* @LastEditTime: 2021-10-15 17:24:52
* @LastEditTime: 2021-10-22 09:28:53
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/components/v-labelDiv/index.vue
-->
<template>
<div class="v-label-container" ref="vlc" :style="eStyle">
<span ref="titleRef" :style="{color: titleColor}">{{title}}</span>
<span ref="titleRef" :style="{color: titleColor}" @click="handlerClick">{{title}}</span>
<div class="gx" v-if="showLine"></div>
<div class="v-l-right">
<slot></slot>
@ -40,6 +40,11 @@ export default {
}
},
methods: {
handlerClick() {
this.$emit('click')
}
}
}
</script>
@ -59,6 +64,7 @@ export default {
color: #fff;
font-size: 16px;
font-weight: 400;
cursor: pointer;
}
.gx {
position: absolute;

@ -1,14 +1,14 @@
<!--
* @Author: xw
* @Date: 2021-10-09 11:28:39
* @LastEditTime: 2021-10-21 15:30:40
* @LastEditTime: 2021-10-22 09:31:42
* @LastEditors: Please set LastEditors
* @Description: 晴雨表
* @FilePath: /data-show/src/views/Index/barometer/index.vue
-->
<template>
<div class="bm-outter">
<v-label-div title="晴雨表">
<v-label-div title="晴雨表" @click="handlerClick">
<div>
<v-tab-group :btns="['正负调性', '负面等级']" @change="handlerChange"></v-tab-group>
</div>
@ -70,6 +70,10 @@ export default {
});
this.opt = createOpt(dx, ds)
})
},
//
handlerClick() {
this.$router.push({path: '/industryDataExport'})
}
}
};

@ -1,46 +1,41 @@
<!--
* @Author: xw
* @Date: 2021-10-08 09:17:42
* @LastEditTime: 2021-10-21 17:55:54
* @LastEditTime: 2021-10-21 19:27:18
* @LastEditors: Please set LastEditors
* @Description: 行业洞察
* @FilePath: /data-show/src/views/Index/index.vue
-->
<template>
<div class="d-container">
<div class="In-body">
<div class="d1">
<real-time-event></real-time-event>
<key-communication-positions></key-communication-positions>
<spread-the-sound></spread-the-sound>
</div>
<div class="d2">
<div class="d2-top">
<dynamic-number @allData="handlerAllData"></dynamic-number>
<div class="d-container">
<div class="In-body">
<div class="d1">
<real-time-event></real-time-event>
<key-communication-positions></key-communication-positions>
<spread-the-sound></spread-the-sound>
</div>
<div class="d2">
<div class="d2-top">
<dynamic-number @allData="handlerAllData"></dynamic-number>
</div>
<div class="d2-bottom">
<barometer></barometer>
<tail-insight></tail-insight>
</div>
</div>
<div class="d3">
<sales-rank></sales-rank>
<user-portrait></user-portrait>
<hot-discussion-graph></hot-discussion-graph>
</div>
</div>
<div class="d2-bottom">
<barometer></barometer>
<tail-insight></tail-insight>
</div>
</div>
<div class="d3">
<sales-rank></sales-rank>
<user-portrait></user-portrait>
<hot-discussion-graph></hot-discussion-graph>
</div>
<!--对话框-->
<v-modal :eleStyle="{ width: '1200px', height: '720px' }" :visible.sync="modalObj.visible" :title="modalObj.title">
<div slot="body" :style="{padding: '16px'}">
<dv-scroll-board :config="config" style="width:1168px;height:640px" />
</div>
</v-modal>
</div>
<!--对话框-->
<v-modal
:eleStyle="{ width: '1200px', height: '720px' }"
:visible.sync="modalObj.visible"
:title="modalObj.title"
>
<div slot="body" :style="{padding: '16px'}">
<v-table :columns="columns" :data="tbData" :pagination="false"> </v-table>
</div>
</v-modal>
</div>
</template>
<script>
@ -53,88 +48,92 @@ import barometer from "./barometer";
import tailInsight from "./tailInsight";
import hotDiscussionGraph from "./hotDiscussionGraph";
import dynamicNumber from "./dynamicNumber";
import {getHomeList0528} from "@/api/home";
import { getHomeList0528 } from "@/api/home";
export default {
name: "index",
components: {
realTimeEvent, //
keyCommunicationPositions, //
salesRank, //
userPortrait, //
spreadTheSound, // TOP10
barometer, //
tailInsight, //
hotDiscussionGraph, //
dynamicNumber, //
},
data() {
return {
modalObj: {
title: "全网数据实时动态",
visible: false,
},
columns: [
{
title: "标题",
key: "name",
dataIndex: "name",
},
{
title: "发布时间",
dataIndex: "age",
key: "age",
},
{
title: "作者",
dataIndex: "address",
key: "address",
name: "index",
components: {
realTimeEvent, //
keyCommunicationPositions, //
salesRank, //
userPortrait, //
spreadTheSound, // TOP10
barometer, //
tailInsight, //
hotDiscussionGraph, //
dynamicNumber, //
},
data() {
return {
modalObj: {
title: "全网数据实时动态",
visible: true,
},
config: {
headerBGC: "#0F2A4D",
oddRowBGC: "rgba(69, 149, 244, 0);",
evenRowBGC: "#0F2A4D;",
columnWidth: [460],
rowNum: 10,
header: ["标题", "发布时间", "作者", "来源"],
data: [],
},
};
},
created() {
this.getTableList();
},
mounted() {
this.modalObj.visible = false;
},
methods: {
handlerAllData() {
this.modalObj.visible = true;
},
{
title: "来源",
dataIndex: "laiyuan",
key: "laiyuan",
getTableList() {
getHomeList0528(this.getCommTime).then((res) => {
let arr = [];
if (Array.isArray(res.data)) {
res.data.forEach((ele) => {
let a = [
ele._source.title,
ele._source.estime,
ele._source.user_author,
ele._source.source,
];
arr.push(a);
});
this.config = {
headerBGC: "#0F2A4D",
oddRowBGC: "rgba(69, 149, 244, 0);",
evenRowBGC: "#0F2A4D;",
columnWidth: [460],
rowNum: 10,
header: ["标题", "发布时间", "作者", "来源"],
data: arr,
};
}
});
},
],
tbData: [],
form: {
RefreshTime: ""
}
};
},
created() {
},
methods: {
handlerAllData() {
this.modalObj.visible = true;
},
getTableList() {
let obj = Object.assign({}, this.getCommTime, this.form)
console.log(obj)
getHomeList0528(obj).then(res => {
console.log(res)
})
}
}
};
</script>
<style lang="less" scoped>
.In-body {
padding: 0px 16px 16px 16px;
display: flex;
justify-content: flex-start;
.d2 {
width: 936px;
margin-left: 16px;
.d2-top {
width: 100%;
height: 644px;
}
.d2-bottom {
display: flex;
justify-content: flex-start;
padding: 0px 16px 16px 16px;
display: flex;
justify-content: flex-start;
.d2 {
width: 936px;
margin-left: 16px;
.d2-top {
width: 100%;
height: 644px;
}
.d2-bottom {
display: flex;
justify-content: flex-start;
}
}
}
}
</style>

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-09 09:04:01
* @LastEditTime: 2021-10-21 18:03:22
* @LastEditTime: 2021-10-22 09:29:49
* @LastEditors: Please set LastEditors
* @Description: 用户画像
* @FilePath: /data-show/src/views/Index/userPortrait/index.vue
@ -13,18 +13,20 @@
</v-label-div>
<div class="u-p-bd">
<div class="u-p-char">
<v-echarts :opt="opt" ></v-echarts>
<v-echarts :opt="opt"></v-echarts>
</div>
<div class="u-p-bd-1">
<v-label-ctx :label="item.key" :cont="item.value" :percentage="(item.value/totalData*100).toFixed(2) +'%'" :color="colors[index]" v-for="(item,index) in labelData" :key="index"></v-label-ctx>
<vue-scroll>
<v-label-ctx :label="item.key" :cont="item.value" :percentage="(item.value/totalData*100).toFixed(2) +'%'" :color="colors[index]" v-for="(item,index) in labelData" :key="index"></v-label-ctx>
</vue-scroll>
</div>
</div>
</div>
</template>
<script>
import createOpt from "./opt"
import {getSexOrAttestationOrRegionHome0528} from "@/api/home"
import createOpt from "./opt";
import { getSexOrAttestationOrRegionHome0528 } from "@/api/home";
export default {
name: "user-portrait",
data() {
@ -35,69 +37,88 @@ export default {
opt: {},
labelData: [],
totalData: 0,
colors: ['#54BF93', '#3373CC', '#CC9D12','#f15c80', '#e4d354', '#8085e8', '#8d4653', '#91e8e1','#f7a35c','#90ed7d']
}
colors: [
"#54BF93",
"#3373CC",
"#CC9D12",
"#f15c80",
"#e4d354",
"#8085e8",
"#8d4653",
"#91e8e1",
"#f7a35c",
"#90ed7d",
],
};
},
created() {
this.getData()
this.getData();
},
methods: {
//
handlerTab(n) {
if(n === 0) {
if (n === 0) {
this.labelData = this.sex;
let total = 0;
this.sex.forEach(ele => {
total+=ele.value;
})
this.sex.forEach((ele) => {
total += ele.value;
});
this.totalData = total;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']);
} else if(n === 1) {
this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
} else if (n === 1) {
this.labelData = this.attestation;
let total = 0;
this.attestation.forEach(ele => {
total+=ele.value;
})
this.attestation.forEach((ele) => {
total += ele.value;
});
this.totalData = total;
this.opt = createOpt(this.attestation, this.colors);
} else {
this.labelData = this.region;
let total = 0;
this.region.forEach(ele => {
total+=ele.value;
})
this.region.forEach((ele) => {
total += ele.value;
});
this.totalData = total;
this.opt = createOpt(this.region, this.colors);
}
},
//
getData() {
getSexOrAttestationOrRegionHome0528(this.getCommTime).then(res => {
let data = res.data;
this.attestation = data.attestation;
this.sex = data.sex;
this.region = data.region;
let total = 0;
this.sex.forEach(ele => {
total+=ele.value;
})
this.totalData = total;
this.labelData = this.sex;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']);
})
getSexOrAttestationOrRegionHome0528(this.getCommTime).then(
(res) => {
let data = res.data;
this.attestation = data.attestation;
this.sex = data.sex;
this.region = data.region;
let total = 0;
this.sex.forEach((ele) => {
total += ele.value;
});
this.totalData = total;
this.labelData = this.sex;
this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
}
);
},
}
}
},
};
</script>
<style lang="less" scoped>
.u-p-outter {
width: 460px;
height: 316px;
border: 2px solid #0f2a4d;
margin-top: 16px;
margin-left: 16px;
width: 460px;
height: 316px;
border: 2px solid #0f2a4d;
margin-top: 16px;
margin-left: 16px;
}
.u-p-bd {
padding: 0 16px;

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-19 14:45:23
* @LastEditTime: 2021-10-20 15:45:49
* @LastEditTime: 2021-10-22 09:34:35
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/Login/forgetPWD/index.vue
@ -67,6 +67,11 @@ export default {
},
};
},
destroyed() {
if(this.timer) {
clearInterval(this.timer);
}
},
methods: {
//
getCode() {

@ -1,13 +1,14 @@
/*
* @Author: your name
* @Date: 2021-10-20 13:15:16
* @LastEditTime: 2021-10-20 13:45:55
* @LastEditTime: 2021-10-22 09:24:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/vue.config.js
*/
module.exports = {
publicPath: "./",
devServer: {
port: "8081",
proxy: {

Loading…
Cancel
Save