prod
lily.zhang 3 years ago
parent cf99d1de09
commit 86f51733d3

@ -1,12 +1,13 @@
/*
* @Author: your name
* @Date: 2021-10-12 10:11:24
* @LastEditTime: 2021-10-29 11:55:53
* @LastEditTime: 2021-10-29 18:18:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/titsopo/opt.js
*/
import * as echarts from "echarts";
import { bigNumberTransform } from "@/utils/gol/dataTool"
let colors = ['#546fc5', '#91cb74', '#f9c857', '#ed6565', '#72bfde', '#3aa272', '#fb8351'];
function createData(ds = []) {
let arr = [];
@ -69,7 +70,8 @@ export default function createOpt(dx = [], ds = []) {
legend: {
icon: 'roundRect',
textStyle: { //图例文字的样式
color: '#fff'
color: '#fff',
fontSize: 10,
},
y: 12,
x: 16,
@ -105,6 +107,12 @@ export default function createOpt(dx = [], ds = []) {
color: "#fff",
},
},
axisLabel: {
formatter: (value) => {
let str = bigNumberTransform(value);
return str;
}
},
splitLine: {
lineStyle: {
type: "dashed", // y轴分割线类型

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 09:17:42
* @LastEditTime: 2021-10-29 18:00:24
* @LastEditTime: 2021-10-29 18:46:54
* @LastEditors: Please set LastEditors
* @Description: 行业洞察
* @FilePath: /data-show/src/views/Index/index.vue
@ -32,13 +32,14 @@
<!--对话框-->
<v-modal :eleStyle="{ width: '86rem', height: '50rem' }" :visible.sync="modalObj.visible" :title="modalObj.title">
<div slot="body" :style="{padding: '1rem', height: '47rem'}">
<vue-scroll ref="vs">
<!-- <vue-scroll ref="vs">
<v-table :columns="columns" :data="tbData" :loading="tableLoading" :pagination="false" row-key="id">
<template slot="titlex" slot-scope="text, record">
<a :href="record.url" style="color: #fff" target="_blank">{{ text }}</a>
</template>
</v-table>
</vue-scroll>
</vue-scroll> -->
<dv-scroll-board :config="config" :style="{ width: '100%', height: '45rem' }" @click="handlerSs" />
</div>
</v-modal>
</div>
@ -79,6 +80,7 @@ export default {
},
tbData: [],
tableLoading: false,
config: {},
columns: [
{
title: "标题",
@ -117,10 +119,6 @@ export default {
this.form.sQuDao = key;
this.getTableList().then(() => {
this.modalObj.visible = true;
this.$nextTick(() => {
console.log(this.$refs["vs"])
this.$refs["vs"].scrollTo({y: 20},300,"easeInQuad")
})
});
},
getTableList() {
@ -131,12 +129,31 @@ export default {
.then((res) => {
let data = res.data || [];
let arr = [];
let arr1 = [];
data.forEach((ele) => {
let _source = ele._source;
let a = [
`<a href="${_source.url}" style="color: #fff" target="_blank">${_source.title}</a>`,
_source.sourcetime,
_source.user_author,
_source.source,
];
arr1.push(a);
arr.push(_source);
});
this.config = {
headerBGC: "#0c203b",
oddRowBGC: "#173b6d",
evenRowBGC: "rgba(69, 149, 244, 0)",
columnWidth: [720, 180],
rowNum: 16,
header: ["标题", "发布时间", "作者", "来源"],
data: arr1,
};
this.tbData = arr;
this.tableLoading = false;
resolve(arr);
})
.catch(() => {

Loading…
Cancel
Save