prod
lily.zhang 4 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,7 +1,7 @@
<!--
* @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
@ -30,15 +30,10 @@
</div>
</div>
<!--对话框-->
<v-modal
:eleStyle="{ width: '1200px', height: '720px' }"
:visible.sync="modalObj.visible"
:title="modalObj.title"
>
<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>
<dv-scroll-board :config="config" style="width:1168px;height:640px" />
</div>
</v-modal>
</div>
</template>
@ -71,51 +66,55 @@ export default {
return {
modalObj: {
title: "全网数据实时动态",
visible: false,
},
columns: [
{
title: "标题",
key: "name",
dataIndex: "name",
},
{
title: "发布时间",
dataIndex: "age",
key: "age",
visible: true,
},
{
title: "作者",
dataIndex: "address",
key: "address",
config: {
headerBGC: "#0F2A4D",
oddRowBGC: "rgba(69, 149, 244, 0);",
evenRowBGC: "#0F2A4D;",
columnWidth: [460],
rowNum: 10,
header: ["标题", "发布时间", "作者", "来源"],
data: [],
},
{
title: "来源",
dataIndex: "laiyuan",
key: "laiyuan",
},
],
tbData: [],
form: {
RefreshTime: ""
}
};
},
created() {
this.getTableList();
},
mounted() {
this.modalObj.visible = false;
},
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)
})
}
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,
};
}
});
},
},
};
</script>

@ -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
@ -16,15 +16,17 @@
<v-echarts :opt="opt"></v-echarts>
</div>
<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>
</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,12 +37,22 @@ 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: {
//
@ -48,48 +60,57 @@ export default {
if (n === 0) {
this.labelData = this.sex;
let total = 0;
this.sex.forEach(ele => {
this.sex.forEach((ele) => {
total += ele.value;
})
});
this.totalData = total;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']);
this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
} else if (n === 1) {
this.labelData = this.attestation;
let total = 0;
this.attestation.forEach(ele => {
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 => {
this.region.forEach((ele) => {
total += ele.value;
})
});
this.totalData = total;
this.opt = createOpt(this.region, this.colors);
}
},
//
getData() {
getSexOrAttestationOrRegionHome0528(this.getCommTime).then(res => {
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 => {
this.sex.forEach((ele) => {
total += ele.value;
})
});
this.totalData = total;
this.labelData = this.sex;
this.opt = createOpt(this.sex, ['#54BF93', '#3373CC', '#CC9D12']);
})
},
}
this.opt = createOpt(this.sex, [
"#54BF93",
"#3373CC",
"#CC9D12",
]);
}
);
},
},
};
</script>
<style lang="less" scoped>
.u-p-outter {

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