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

@ -1,14 +1,14 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-08 16:01:05 * @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 * @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
--> -->
<template> <template>
<div class="v-label-container" ref="vlc" :style="eStyle"> <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="gx" v-if="showLine"></div>
<div class="v-l-right"> <div class="v-l-right">
<slot></slot> <slot></slot>
@ -40,6 +40,11 @@ export default {
} }
}, },
methods: {
handlerClick() {
this.$emit('click')
}
}
} }
</script> </script>
@ -59,6 +64,7 @@ export default {
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
cursor: pointer;
} }
.gx { .gx {
position: absolute; position: absolute;

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

@ -1,46 +1,41 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-08 09:17:42 * @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 * @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">
<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>
<key-communication-positions></key-communication-positions> <key-communication-positions></key-communication-positions>
<spread-the-sound></spread-the-sound> <spread-the-sound></spread-the-sound>
</div> </div>
<div class="d2"> <div class="d2">
<div class="d2-top"> <div class="d2-top">
<dynamic-number @allData="handlerAllData"></dynamic-number> <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>
<div class="d2-bottom"> <!--对话框-->
<barometer></barometer> <v-modal :eleStyle="{ width: '1200px', height: '720px' }" :visible.sync="modalObj.visible" :title="modalObj.title">
<tail-insight></tail-insight> <div slot="body" :style="{padding: '16px'}">
</div> <dv-scroll-board :config="config" style="width:1168px;height:640px" />
</div> </div>
<div class="d3"> </v-modal>
<sales-rank></sales-rank>
<user-portrait></user-portrait>
<hot-discussion-graph></hot-discussion-graph>
</div>
</div> </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> </template>
<script> <script>
@ -53,88 +48,92 @@ import barometer from "./barometer";
import tailInsight from "./tailInsight"; import tailInsight from "./tailInsight";
import hotDiscussionGraph from "./hotDiscussionGraph"; import hotDiscussionGraph from "./hotDiscussionGraph";
import dynamicNumber from "./dynamicNumber"; import dynamicNumber from "./dynamicNumber";
import {getHomeList0528} from "@/api/home"; import { getHomeList0528 } from "@/api/home";
export default { export default {
name: "index", name: "index",
components: { components: {
realTimeEvent, // realTimeEvent, //
keyCommunicationPositions, // keyCommunicationPositions, //
salesRank, // salesRank, //
userPortrait, // userPortrait, //
spreadTheSound, // TOP10 spreadTheSound, // TOP10
barometer, // barometer, //
tailInsight, // tailInsight, //
hotDiscussionGraph, // hotDiscussionGraph, //
dynamicNumber, // dynamicNumber, //
}, },
data() { data() {
return { return {
modalObj: { modalObj: {
title: "全网数据实时动态", title: "全网数据实时动态",
visible: false, visible: true,
}, },
columns: [ config: {
{ headerBGC: "#0F2A4D",
title: "标题", oddRowBGC: "rgba(69, 149, 244, 0);",
key: "name", evenRowBGC: "#0F2A4D;",
dataIndex: "name", columnWidth: [460],
}, rowNum: 10,
{ header: ["标题", "发布时间", "作者", "来源"],
title: "发布时间", data: [],
dataIndex: "age", },
key: "age", };
}, },
{ created() {
title: "作者", this.getTableList();
dataIndex: "address", },
key: "address", mounted() {
this.modalObj.visible = false;
},
methods: {
handlerAllData() {
this.modalObj.visible = true;
}, },
{ getTableList() {
title: "来源", getHomeList0528(this.getCommTime).then((res) => {
dataIndex: "laiyuan", let arr = [];
key: "laiyuan", 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> </script>
<style lang="less" scoped> <style lang="less" scoped>
.In-body { .In-body {
padding: 0px 16px 16px 16px; padding: 0px 16px 16px 16px;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
.d2 { .d2 {
width: 936px; width: 936px;
margin-left: 16px; margin-left: 16px;
.d2-top { .d2-top {
width: 100%; width: 100%;
height: 644px; height: 644px;
} }
.d2-bottom { .d2-bottom {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
}
} }
}
} }
</style> </style>

@ -1,7 +1,7 @@
<!-- <!--
* @Author: xw * @Author: xw
* @Date: 2021-10-09 09:04:01 * @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 * @LastEditors: Please set LastEditors
* @Description: 用户画像 * @Description: 用户画像
* @FilePath: /data-show/src/views/Index/userPortrait/index.vue * @FilePath: /data-show/src/views/Index/userPortrait/index.vue
@ -13,18 +13,20 @@
</v-label-div> </v-label-div>
<div class="u-p-bd"> <div class="u-p-bd">
<div class="u-p-char"> <div class="u-p-char">
<v-echarts :opt="opt" ></v-echarts> <v-echarts :opt="opt"></v-echarts>
</div> </div>
<div class="u-p-bd-1"> <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> </div>
</div> </div>
</template> </template>
<script> <script>
import createOpt from "./opt" import createOpt from "./opt";
import {getSexOrAttestationOrRegionHome0528} from "@/api/home" import { getSexOrAttestationOrRegionHome0528 } from "@/api/home";
export default { export default {
name: "user-portrait", name: "user-portrait",
data() { data() {
@ -35,69 +37,88 @@ export default {
opt: {}, opt: {},
labelData: [], labelData: [],
totalData: 0, 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() { created() {
this.getData() this.getData();
}, },
methods: { methods: {
// //
handlerTab(n) { handlerTab(n) {
if(n === 0) { if (n === 0) {
this.labelData = this.sex; this.labelData = this.sex;
let total = 0; let total = 0;
this.sex.forEach(ele => { this.sex.forEach((ele) => {
total+=ele.value; total += ele.value;
}) });
this.totalData = total; this.totalData = total;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']); this.opt = createOpt(this.sex, [
} else if(n === 1) { "#54BF93",
"#3373CC",
"#CC9D12",
]);
} else if (n === 1) {
this.labelData = this.attestation; this.labelData = this.attestation;
let total = 0; let total = 0;
this.attestation.forEach(ele => { this.attestation.forEach((ele) => {
total+=ele.value; total += ele.value;
}) });
this.totalData = total; this.totalData = total;
this.opt = createOpt(this.attestation, this.colors); this.opt = createOpt(this.attestation, this.colors);
} else { } else {
this.labelData = this.region; this.labelData = this.region;
let total = 0; let total = 0;
this.region.forEach(ele => { this.region.forEach((ele) => {
total+=ele.value; total += ele.value;
}) });
this.totalData = total; this.totalData = total;
this.opt = createOpt(this.region, this.colors); this.opt = createOpt(this.region, this.colors);
} }
}, },
// //
getData() { getData() {
getSexOrAttestationOrRegionHome0528(this.getCommTime).then(res => { getSexOrAttestationOrRegionHome0528(this.getCommTime).then(
let data = res.data; (res) => {
this.attestation = data.attestation; let data = res.data;
this.sex = data.sex; this.attestation = data.attestation;
this.region = data.region; this.sex = data.sex;
let total = 0; this.region = data.region;
this.sex.forEach(ele => { let total = 0;
total+=ele.value; this.sex.forEach((ele) => {
}) total += ele.value;
this.totalData = total; });
this.labelData = this.sex; this.totalData = total;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']); this.labelData = this.sex;
}) this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
}
);
}, },
},
} };
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.u-p-outter { .u-p-outter {
width: 460px; width: 460px;
height: 316px; height: 316px;
border: 2px solid #0f2a4d; border: 2px solid #0f2a4d;
margin-top: 16px; margin-top: 16px;
margin-left: 16px; margin-left: 16px;
} }
.u-p-bd { .u-p-bd {
padding: 0 16px; padding: 0 16px;

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

@ -1,13 +1,14 @@
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-10-20 13:15:16 * @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 * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/vue.config.js * @FilePath: /data-show/vue.config.js
*/ */
module.exports = { module.exports = {
publicPath: "./",
devServer: { devServer: {
port: "8081", port: "8081",
proxy: { proxy: {

Loading…
Cancel
Save