张雄 3 years ago
parent b366ee8739
commit aa8b047719

@ -156,6 +156,19 @@ export function getSexMerge(params) {
})
}
// 主题分析-区域分布
export function getVolume(params) {
let obj = Object.assign({action: 'getVolume', sType: ''}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 主题分析-区域分布
export function getRegion(params) {
let obj = Object.assign({action: 'getRegion', sType: ''}, params)
@ -207,3 +220,68 @@ export function getRegionWeiBo(params) {
}
})
}
// 主题分析-看板导出
export function ToWord(params) {
let obj = Object.assign({action: 'ToWord', sType: 'ZhuTiFenXiBl'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 主题分析-相似-列表数据
export function getSimilarityData(params) {
let obj = Object.assign({action: 'getSimilarityData', sType: 'ZhuTiFenXiBl'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 主题分析-相似-传播
export function getDiffuse(params) {
let obj = Object.assign({action: 'getDiffuse', sType: 'ZhuTiFenXiBl'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 主题分析-相似-获得数据
export function getDataById(params) {
let obj = Object.assign({action: 'getDataById', sType: 'ZhuTiFenXiBl'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 主题分析-相似-下载
export function toExcel(params) {
let obj = Object.assign({action: 'toExcel', sType: 'ZhuTiFenXiBl'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

@ -6,11 +6,36 @@
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="card-container">
<a-tabs type="card">
<a-tabs type="card" @change=handlerChangeTheme>
<template slot="tabBarExtraContent">
<a-button @click="handlerAdd"></a-button>
</template>
<a-tab-pane class="tab-pane" key="1" tab="我的主题">
<a-tab-pane class="tab-pane" key="0" tab="我的主题">
<div class="card-items" v-for="(item, index) in myThemeArr" :key="index">
<div class="card-item-top">
<a-button type="primary" v-if="item.isCom"></a-button>
<a-button v-else disabled>已完成</a-button>
<a-button-group style="float: right">
<a-button type="primary" @click="handlerEdit(item.guids)"></a-button>
<a-popconfirm @confirm="handlerDel(item.guids)" @cancel="cancel">
<div slot="title" style="color: white">此操作将删除数据是否继续</div>
<a-button type="primary">删除</a-button>
</a-popconfirm>
</a-button-group>
</div>
<div class="card-item-data" @click="toThemeData(item.guids)">
<div class="cid-title">
{{item.name}}
</div>
<div class="cid-data">
<div class="s1"><div class="s1-title">开始时间</div><div class="s1-text">{{item.startTime}}</div></div>
<div class="s1"><div class="s1-title">结束时间</div><div class="s1-text">{{item.endTime}}</div></div>
<div class="s1"><div class="s1-title">相关报道</div><div class="s1-text">{{item.total}}</div></div>
</div>
</div>
</div>
</a-tab-pane>
<a-tab-pane class="tab-pane" key="1" tab="往期主题">
<div class="card-items" v-for="(item, index) in myThemeArr" :key="index">
<div class="card-item-top">
<a-button type="primary" v-if="item.isCom"></a-button>
@ -35,7 +60,6 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="往期主题"></a-tab-pane>
</a-tabs>
</div>
</div>

@ -48,9 +48,8 @@ export default {
token: this.getToken,
Guids: guids
};
getSchemeDataByGuid(obj).then(res => {
getSchemeDataByGuid(obj).then(res => {
let data = res.data;
console.log(data);
this.addForm = data;
this.doCombo();
this.doComboHigh();
@ -124,6 +123,16 @@ export default {
handlerTabs(activeTab) {
this.addForm.DetailsData[0].IsAdvancedQuery = activeTab;
},
//切换主题
handlerChangeTheme(n) {
if(n == 1) {
this.form.sType = 'former';
}
if(n == 0) {
this.form.sType = 'now';
};
this.getNowData();
},
//重置表单
reSet() {
this.addForm = {
@ -145,27 +154,41 @@ export default {
},
//前往详情页
toThemeData(guids) {
this.$router.push(
{
path: '/ThemeData',
query: {
action: "getList",
// sTimeType,
// sQuDao,
// sQingGan,
// iPageIndex,
// iPageSize,
token: this.getToken,
sType: "ZhuTiFenXiBl",
sGuid: guids,
// iGroupBy,
// isSourcetype,
// listType,
// website,
// iTimeType
},
}
)
let obj = {
token: this.getToken,
Guids: guids
};
let sTime = '';
let eTime = '';
getSchemeDataByGuid(obj).then(res => {
let data = res.data;
sTime = data.StartTime;
eTime = data.EndTime;
this.$router.push(
{
path: '/ThemeData',
query: {
action: "getList",
// sTimeType,
// sQuDao,
// sQingGan,
// iPageIndex,
// iPageSize,
startTime: sTime,
endTime: eTime,
token: this.getToken,
sType: "ZhuTiFenXiBl",
sGuid: guids,
// iGroupBy,
// isSourcetype,
// listType,
// website,
// iTimeType
},
}
)
})
},
//日期
calendarPriceRangeChange(date) {

@ -13,13 +13,56 @@
</template>
<script>
import {getRegion} from "@/api/ThemeAnalizeDec"
import createOptD1 from "./opt1";
import createOptD2 from "./opt2";
export default {
name: "VolumeArea",
data() {
return {
form: {
token: ''
},
opt1: {},
opt2: {}
}
},
created() {
this.form = this.$route.query;
this.getData();
},
methods: {
getData() {
let obj = Object.assign({}, this.form);
getRegion(obj).then(res => {
let data = res.data || {};
let arr = this.toArr(data);
let dx = []; //
let ds = []; //
arr.forEach((ele) => {
ele.name = ele.name.replace('省','')
let value = ele.value;
dx.push(ele.name);
ds.push(value);
});
let dm = arr //
this.opt1 = createOptD1(dx, ds);
this.opt2 = createOptD2(dm);
this.load = false;
})
},
//
toArr(obj) {
let arr = [];
for (let key in obj) {
let o = {
name: key,
value: obj[key] * 1,
};
arr.push(o);
}
return arr;
},
}
}
</script>

@ -3,6 +3,7 @@
<div class="d-outter">
<div class="d-outter-d1">
<v-label-div title="主题概述">
<v-btn @click="goDownload"></v-btn>
<v-btn @click="goBack"></v-btn>
</v-label-div>
<div class="s1">
@ -54,6 +55,9 @@ import userArea from "./UserArea" //用户区域分布
import peopleGender from "./PeopleGender" //
import peopleAuthen from "./PeopleAuthen" //
import weiboAnalize from "./WeiboAnalize" //
import {getVolumeTime,getList,getCoreDiffuse,getCoreWebsite,getSourcetypeTime,getHotWord,
getHottalk,getPositive,getNegative,getRegion,getSexMerge,getVAnalyze,getDiffuseZhuTi,
getRegionWeiBo,ToWord} from "@/api/ThemeAnalizeDec"
export default {
name: "ThemeBoard",
components: {
@ -79,11 +83,38 @@ export default {
},
form: {
token: ''
},
downloadForm: {
sType: 'ZhuTiFenXiBl',
sGuid: '',
sData: {
getSummarize: '',
getVolumeTime: {Msg: '',sBase64: ''},
getList: [],
getCoreDiffuse: [],
getCoreWebsite: {Data: {}},
getSourcetypeTime: {Msg: '',sBase64: ''},
getHotWord: {Msg: '',sBase64: ''},
getHottalk: {Msg: '',sBase64: ''},
getAffections: {Msg: '',sBase64: ''},
getPositive: {Msg: '',sBase64: ''},
getNegative: {Msg: '',sBase64: ''},
getVolume: {Data:{},sBase64: ''},
getSex: {Msg: '',sBase64: ''}, //getSexMerge
getAttestation: {Msg: '',sBase64: ''}, //getSexMerge
getRegion: {Data:{},sBase64: ''},
getVAnalyze: {Msg: '',Data:{},sBase64: ''},
getCoreDiffuseWeiBo: [],
getDiffuse: {Data:{},sBase64: ''},
getAffectionsWeiBo: {sBase64: ''},
getRegionWeiBo: {Data:{},sBase64: ''},
}
}
}
},
created() {
this.form = this.$route.query;
this.form = Object.assign({},{token: this.getToken},this.$route.query)
this.downloadForm.sGuid = this.$route.query.sGuid;
this.getTitleData();
},
methods: {
@ -94,12 +125,94 @@ export default {
let obj = Object.assign({}, this.form);
getSummarizeMerge(obj).then(res => {
let data = res.data;
this.downloadForm.sData.getSummarize = data.Summarize;
this.downloadForm.sData.getAffections.Msg = data.AffectionsMsg;
let o = {
title: data.Summarize,
content: data.AffectionsMsg
};
this.themeObj = o
})
},
goDownload() {
Promise.all([this.doData()]).then(() => {
let str = JSON.stringify(this.downloadForm);
let obj = {
token: this.getToken,
sType: 'ZhuTiFenXiBl',
sJson: str
}
ToWord(obj).then(res => {
let url = res.data;
this.$notification.open({
message: `数据生成中`,
description: '请前往个人中心查看下载进度',
placement: 'bottomRight',
});
window.location.href=url;
})
});
},
doData() {
getVolumeTime(this.form).then(res => {
this.downloadForm.sData.getVolumeTime.Msg = res.msg;
});
let o = {
iPageIndex: 1,
iPageSize: 20,
iTimeType: 0
};
let obj = Object.assign({},o,this.form);
getList(obj).then(res => {
this.downloadForm.sData.getList = res.data
});
getCoreDiffuse(this.form).then(res => {
this.downloadForm.sData.getCoreDiffuse = res.data;
});
getCoreWebsite(this.form).then(res => {
this.downloadForm.sData.getCoreWebsite.Data = res.data;
});
getSourcetypeTime(this.form).then(res => {
this.downloadForm.sData.getSourcetypeTime.Msg = res.msg;
});
getHotWord(this.form).then(res => {
this.downloadForm.sData.getHotWord.Msg = res.msg;
});
getHottalk(this.form).then(res => {
this.downloadForm.sData.getHottalk.Msg = res.msg;
});
getPositive(this.form).then(res => {
this.downloadForm.sData.getPositive.Msg = res.msg;
});
getNegative(this.form).then(res => {
this.downloadForm.sData.getNegative.Msg = res.msg;
});
getRegion(this.form).then(res => {
this.downloadForm.sData.getVolume.Data = res.data;
});
getSexMerge(this.form).then(res => {
this.downloadForm.sData.getSex.Msg = res.data.sexMsg;
this.downloadForm.sData.getAttestation.Msg = res.data.attestationMsg;
});
getRegion(this.form).then(res => {
this.downloadForm.sData.getRegion.Data = res.data;
});
getVAnalyze(this.form).then(res => {
this.downloadForm.sData.getVAnalyze.Msg = res.data.getVAnalyzeMsg;
this.downloadForm.sData.getVAnalyze.Data = res.data.getVAnalyze;
});
getDiffuseZhuTi(this.form).then(res => {
let dt = {
total: res.data.total,
sum: res.data.sum,
volume: res.data.volume,
};
this.downloadForm.sData.getCoreDiffuseWeiBo = res.data.getCoreDiffuseWeiBo;
this.downloadForm.sData.getDiffuse.Data = dt;
});
getRegionWeiBo(this.form).then(res => {
this.downloadForm.sData.getRegionWeiBo.Data = res.data;
});
}
}
}

@ -1,4 +1,4 @@
import { getQuDao, getQingGan, getTwoTime} from "@/api/comm";
import { getQuDao, getQingGan, getTwoTime,getToExcelField} from "@/api/comm";
import {getList} from "@/api/ThemeAnalizeDec"
export default {
//获取表格数据
@ -11,10 +11,12 @@ export default {
this.pagination.total = res.totalNum;
let arr = [];
let ids = [];
let ssims = [];
let ssk = [...this.sk];
data.forEach((ele) => {
let _source = ele._source;
let id = _source.id;
ssims.push(ele._source.ssid);
ids.push(id);
arr.push(_source);
});
@ -32,6 +34,10 @@ export default {
this.tbData = arr;
this.tableLoading = false;
})
},
// 获取列表
getListData() {
},
// 获取时间选项
getTime() {
@ -74,7 +80,7 @@ export default {
})
.catch(() => {
reject(false);
});
});
});
},
// 获取情感
@ -127,4 +133,30 @@ export default {
});
this.form.sQingGan = qingGan.toString();
},
// 获取导出字段
getToExcelField(sType, token) {
return new Promise((resolve, reject) => {
getToExcelField({sType: sType, token: token}).then(res => {
let data = res.data;
let arr = [];
let arr1 = [];
data.forEach((ele) => {
if(ele.checked == 1) {
arr1.push(ele.field)
}
let obj = {
label: ele.name,
value: ele.field,
};
arr.push(obj);
});
this.checkedIds = arr1;
this.fileTypeChange(arr1);
this.plainOptions4 = arr;
resolve(arr);
}).catch(() => {
reject(false);
})
})
}
}

@ -40,9 +40,9 @@
<v-tab-group :value="gValue2" :style="{ background: 'transparent' }" :btns="btnTimes2" @change="handlerTime2"></v-tab-group>
</div>
<div class="d-inner-d2">
<span class="s1">共计<span class="ss1">{{totalNum}}</span>条数据已选中<span class="ss1"></span>条数据</span>
<span class="s1">共计<span class="ss1">{{totalNum}}</span>条数据已选中<span class="ss1">{{tableAll ? totalNum : sk.length}}</span>条数据</span>
<div>
<a-button type="primary" >导出数据</a-button>
<a-button type="primary" @click="goOutput"></a-button>
<a-button type="primary" @click="goThemeBoard"></a-button>
</div>
</div>
@ -59,6 +59,29 @@
</v-table>
</div>
</div>
<v-modal :title="modalObj.title" :visible.sync="modalObj.visible" :eleStyle="{ width: '60rem', height: '36rem'}">
<div slot="body" style="padding: 1rem 1rem 1rem 1rem">
<a-form :form="execlForm" :label-col="{ span: 3 }" :wrapper-col="{ span: 8 }">
<a-form-item label="文件名称">
<a-input v-model="execlForm.sFileName" disabled placeholder="请输入文件名称"></a-input>
</a-form-item>
<a-form-item label="导出格式">
<span style="color: #63aecc; font-size: 14px">xlsx</span>
</a-form-item>
<a-form-item label="导出字段" :wrapper-col="{ span: 21 }">
<a-checkbox-group v-model="checkedIds" :options="plainOptions4" @change="fileTypeChange" />
</a-form-item>
<a-form-item label="导出条数">
<span style="color: #63aecc; font-size: 14px">{{execlForm.iNum}}</span>
</a-form-item>
</a-form>
</div>
<div slot="footer">
<div class="epor" align="center">
<div class="epor-btn" @click="exportExcel"></div>
</div>
</div>
</v-modal>
</div>
</template>
@ -73,7 +96,23 @@ export default {
},
data() {
return {
//--//
plainOptions4: [],
modalObj: {
title: "导出选项",
visible: false,
},
execlForm: {
action: "toExcel",
sFileName: "",
sCheckedIds: "",
iNum: 0,
sField: "",
},
checkedIds: [],
//
noClick: false,
tableAll: false,
totalNum: 0,
form: {
action: 'getList',
@ -197,4 +236,20 @@ export default {
}
}
}
.epor {
width: 100%;
height: 80px;
.epor-btn {
width: 480px;
height: 80px;
background-image: url("../../assets/images/comm/img_bbut.png");
background-repeat: no-repeat;
background-size: cover;
text-align: center;
line-height: 80px;
color: #63aecc;
font-size: 28px;
cursor: pointer;
}
}
</style>

@ -9,7 +9,6 @@ export function rowSelection() {
this.selectedRowKeys = selectedRowKeys.toString();
this.selectedRows = selectedRows;
this.secIds = selectedRowKeys;
},
onSelect:(record, selected) => {
if(!selected) {
@ -29,6 +28,7 @@ export function rowSelection() {
}
import moment from "moment";
import {toExcel} from "@/api/ThemeAnalizeDec";
export default {
//---主页面---//
@ -36,7 +36,7 @@ export default {
Promise.all([
this.getTime(),
this.getQuDao(),
this.getQingGan()
this.getQingGan(),
]).then(() => {
this.form.token = this.getToken;
this.form.sGuid = this.$route.query.sGuid;
@ -49,7 +49,7 @@ export default {
this.doFormQudao(qudao);
this.doFormQS(series);
this.form.sTimeType = this.$route.query.sTimeType || '34';
this.form.sTimeType = this.$route.query.sTimeType || '4';
this.form.sStartTime = this.$route.query.startTime || "";
this.form.sEndTime = this.$route.query.endTime || "";
if (this.form.sStartTime && this.form.sEndTime) {
@ -79,6 +79,8 @@ export default {
token: this.getToken,
website: this.form.website,
sTitle: this.form.sTitle,
sStartTime: this.form.sStartTime,
sEndTime: this.form.sEndTime,
sTimeType: this.form.sTimeType,
sQuDao: this.form.sQuDao,
sQingGan: this.form.sQingGan
@ -193,4 +195,73 @@ export default {
this.pagination.current = iPageIndex;
this.getTableData();
},
//前往导出页面
goOutput() {
this.getToExcelField(this.form.sType, this.form.token).then(() => {
if(!this.form.sBrand && !this.form.sSeriesName) {
this.execlForm.sFileName = "事件数据" + this.getDatetimeSs();
} else {
this.execlForm.sFileName = this.form.sBrand + this.form.sSeriesName + this.getDatetimeSs();
}
this.execlForm.sCheckedIds = this.tableAll ? '' : this.sk.toString();
this.execlForm.iNum = this.tableAll ? this.totalNum : this.sk.length;
this.modalObj.visible = true;
})
},
// 导出数据
exportExcel() {
if(this.execlForm.iNum === 0) {
this.$message.warning('请选择下载数据');
return;
}
if(this.checkedIds.length === 0) {
this.$message.warning('请选择下载字段');
return;
}
if (this.execlForm.iNum && this.checkedIds.length > 0) {
let o = {
token: this.getToken,
sTimeType: this.form.sTimeType,
sStartTime: this.form.sStartTime,
sEndTime: this.form.sEndTime,
sQuDao: this.form.sTimeType,
sQingGan: this.form.sQingGan,
sTitle: this.form.sTitle,
sTitleType: '1',
sGuid: this.form.sGuid,
iTimeType: this.form.sGuid,
website: this.form.website,
}
let eForm = Object.assign(o,this.execlForm);
toExcel(eForm).then(() => {
this.$notification.open({
message: `数据生成中`,
description: '请前往个人中心查看下载进度',
placement: 'bottomRight',
});
this.modalObj.visible = false;
})
}
},
// 导出时将对象合并
mergeForm() {
let wKey = ['action', 'iPageIndex', 'iPageSize'];
for (let key in this.form) {
if (!wKey.includes(key)) {
this.execlForm[key] = this.form[key]
}
}
},
// 选择导出接口
fileTypeChange(val = []) {
let obj = {};
this.plainOptions4.forEach(ele => {
if (val.includes(ele.value)) {
obj[ele.value] = 1;
} else {
obj[ele.value] = 0;
}
});
this.execlForm.sField = JSON.stringify(obj);
},
}
Loading…
Cancel
Save