|
|
|
@ -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(() => {
|
|
|
|
|