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,7 +1,7 @@
<!-- <!--
* @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
@ -30,15 +30,10 @@
</div> </div>
</div> </div>
<!--对话框--> <!--对话框-->
<v-modal <v-modal :eleStyle="{ width: '1200px', height: '720px' }" :visible.sync="modalObj.visible" :title="modalObj.title">
:eleStyle="{ width: '1200px', height: '720px' }"
:visible.sync="modalObj.visible"
:title="modalObj.title"
>
<div slot="body" :style="{padding: '16px'}"> <div slot="body" :style="{padding: '16px'}">
<v-table :columns="columns" :data="tbData" :pagination="false"> </v-table> <dv-scroll-board :config="config" style="width:1168px;height:640px" />
</div> </div>
</v-modal> </v-modal>
</div> </div>
</template> </template>
@ -53,7 +48,7 @@ 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: {
@ -71,51 +66,55 @@ export default {
return { return {
modalObj: { modalObj: {
title: "全网数据实时动态", title: "全网数据实时动态",
visible: false, visible: true,
},
columns: [
{
title: "标题",
key: "name",
dataIndex: "name",
},
{
title: "发布时间",
dataIndex: "age",
key: "age",
}, },
{ config: {
title: "作者", headerBGC: "#0F2A4D",
dataIndex: "address", oddRowBGC: "rgba(69, 149, 244, 0);",
key: "address", evenRowBGC: "#0F2A4D;",
columnWidth: [460],
rowNum: 10,
header: ["标题", "发布时间", "作者", "来源"],
data: [],
}, },
{
title: "来源",
dataIndex: "laiyuan",
key: "laiyuan",
},
],
tbData: [],
form: {
RefreshTime: ""
}
}; };
}, },
created() { created() {
this.getTableList();
},
mounted() {
this.modalObj.visible = false;
}, },
methods: { methods: {
handlerAllData() { handlerAllData() {
this.modalObj.visible = true; this.modalObj.visible = true;
}, },
getTableList() { getTableList() {
let obj = Object.assign({}, this.getCommTime, this.form) getHomeList0528(this.getCommTime).then((res) => {
console.log(obj) let arr = [];
getHomeList0528(obj).then(res => { if (Array.isArray(res.data)) {
console.log(res) 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,
};
} }
});
},
},
}; };
</script> </script>

@ -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">
<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> <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,61 +37,80 @@ 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(
(res) => {
let data = res.data; let data = res.data;
this.attestation = data.attestation; this.attestation = data.attestation;
this.sex = data.sex; this.sex = data.sex;
this.region = data.region; this.region = data.region;
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.labelData = this.sex; this.labelData = this.sex;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']); this.opt = createOpt(this.sex, [
}) "#54BF93",
}, "#3373CC",
"#CC9D12",
]);
} }
} );
},
},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.u-p-outter { .u-p-outter {

@ -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