张雄 3 years ago
parent ad30281ef7
commit 52427a3665

@ -62,7 +62,7 @@ let colors = [new echarts.graphic.LinearGradient(0, 0, 0, 1, [
offset: 1, offset: 1,
color: '#CC5B4166' color: '#CC5B4166'
} }
], false)] ], false)]
function createData(dataList = [],dx = []) { function createData(dataList = [],dx = []) {
let arr = []; let arr = [];

@ -25,7 +25,7 @@ function createData(obj = {}) {
data: obj[key], data: obj[key],
type: 'scatter', type: 'scatter',
symbolSize: function (data) { symbolSize: function (data) {
return data[2] / 0.023e2; return data[2] / 0.007e2;
} }
} }
arr.push(o) arr.push(o)

@ -18,7 +18,7 @@ function createData(obj = {}) {
data: obj[key], data: obj[key],
type: 'scatter', type: 'scatter',
symbolSize: function (data) { symbolSize: function (data) {
return data[2] / 0.023e2 return data[2] / 0.007e2;
} }
} }
arr.push(o) arr.push(o)

@ -13,7 +13,7 @@ function createData(ds=[], colors=[]) {
let ele = ds[i]; let ele = ds[i];
if(true) { if(true) {
let obj = { value: ele.value*1, name: ele.key, itemStyle: { let obj = { value: ele.value*1, name: ele.key, itemStyle: {
color: colors[index] color: colors[i]
}}; }};
arr.push(obj) arr.push(obj)
} }

@ -13,7 +13,7 @@ function createData(ds=[], colors=[]) {
let ele = ds[i]; let ele = ds[i];
if(ele.value*1 > 0) { if(ele.value*1 > 0) {
let obj = { value: ele.value*1, name: ele.key, itemStyle: { let obj = { value: ele.value*1, name: ele.key, itemStyle: {
color: colors[index] color: colors[i]
}}; }};
arr.push(obj) arr.push(obj)
} }

@ -97,7 +97,6 @@ export default {
this.labelData = labelData; this.labelData = labelData;
this.total = totalVal this.total = totalVal
this.opt = createOpt(labelData, this.colors); this.opt = createOpt(labelData, this.colors);
this.load = false
}); });
getSummarizeMerge(obj).then(res => { getSummarizeMerge(obj).then(res => {
let data = res.data.Affections; let data = res.data.Affections;
@ -115,6 +114,7 @@ export default {
this.total2 = totalVal2 this.total2 = totalVal2
this.opt2 = createOpt(labelData2, this.colors); this.opt2 = createOpt(labelData2, this.colors);
}) })
this.load = false
}, },
handlerTab(active) { handlerTab(active) {
this.active = active this.active = active

@ -13,7 +13,7 @@ function createData(ds=[], colors=[]) {
let ele = ds[i]; let ele = ds[i];
if(ele.value*1 > 0) { if(ele.value*1 > 0) {
let obj = { value: ele.value*1, name: ele.key, itemStyle: { let obj = { value: ele.value*1, name: ele.key, itemStyle: {
color: colors[index] color: colors[i]
}}; }};
arr.push(obj) arr.push(obj)
} }

@ -1,4 +1,4 @@
import { getQuDao, getQingGan, getQueryType ,getToExcelField} from "@/api/comm"; import { getQuDao, getQingGan, getCrisis, getQueryType ,getToExcelField} from "@/api/comm";
import {getList} from "@/api/ThemeAnalizeDec" import {getList} from "@/api/ThemeAnalizeDec"
import { doStr } from "@/utils/gol/dataTool"; import { doStr } from "@/utils/gol/dataTool";
import {getSchemeDataByGuid} from "@/api/ThemeAnalize" import {getSchemeDataByGuid} from "@/api/ThemeAnalize"
@ -128,6 +128,28 @@ export default {
}); });
}); });
}, },
// 获取负面等级
getCrisis() {
return new Promise((resolve, reject) => {
getCrisis()
.then((res) => {
let data = res.data;
let arr = [];
data.forEach((ele) => {
let obj = {
label: ele.value,
value: ele.key,
};
arr.push(obj);
});
this.plainOptions3 = arr;
resolve(arr);
})
.catch(() => {
reject(false);
});
});
},
//获取查询类型 //获取查询类型
getQueryType() { getQueryType() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -158,15 +180,23 @@ export default {
// 给后台传情感和负面等级 // 给后台传情感和负面等级
doFormQS(val = []) { doFormQS(val = []) {
let qingGan = []; let qingGan = [];
let crisis = [];
val.forEach((ele) => { val.forEach((ele) => {
let n1 = this.plainOptions1.findIndex((e) => { let n1 = this.plainOptions1.findIndex((e) => {
return e.label === ele; return e.label === ele;
}); });
let n2 = this.plainOptions3.findIndex((e) => {
return e.label === ele;
});
if (n1 != -1) { if (n1 != -1) {
qingGan.push(this.plainOptions1[n1].value); qingGan.push(this.plainOptions1[n1].value);
} }
if (n2 != -1) {
crisis.push(this.plainOptions3[n2].value);
}
}); });
this.form.sQingGan = qingGan.toString(); this.form.sQingGan = qingGan.toString();
this.form.sCrisis = crisis.toString();
}, },
// 获取导出字段 // 获取导出字段
getToExcelField(sType, token) { getToExcelField(sType, token) {

@ -25,7 +25,8 @@
<a-checkbox :disabled="noClick" :indeterminate="dxIndeterminate" :checked="dxCheckAll" @change="onCheckAllChangeDx"> <a-checkbox :disabled="noClick" :indeterminate="dxIndeterminate" :checked="dxCheckAll" @change="onCheckAllChangeDx">
全部 全部
</a-checkbox> </a-checkbox>
<a-checkbox-group v-model="diaoXing" :disabled="noClick" :options="plainOptions1" @change="(val) => onChange(val, 'diaoXing')" /> <!-- <a-checkbox-group v-model="diaoXing" :disabled="noClick" :options="plainOptions1" @change="(val) => onChange(val, 'diaoXing')" /> -->
<a-checkbox-group v-model="diaoXing" :disabled="noClick" :options="plainOptions5" @change="(val) => onChange(val, 'diaoXing')" />
</div> </div>
<div class="d-inner-d1"> <div class="d-inner-d1">
<span class="s1">关键词</span> <span class="s1">关键词</span>
@ -122,6 +123,7 @@ export default {
sEndTime: '', sEndTime: '',
sQuDao: '', sQuDao: '',
sQingGan: '', sQingGan: '',
sCrisis: '',
iPageIndex: 1, iPageIndex: 1,
iPageSize: 20, iPageSize: 20,
sTitle: "", sTitle: "",
@ -163,6 +165,8 @@ export default {
btnTimes2:['不去重','相似度去重'], btnTimes2:['不去重','相似度去重'],
// //
plainOptions2:[], plainOptions2:[],
plainOptions3: [],
plainOptions5: [],
searchTitle: '', searchTitle: '',
// //
columns: [ columns: [

@ -38,6 +38,7 @@ export default {
this.getQingGan(), this.getQingGan(),
this.getQueryType(), this.getQueryType(),
this.getQuDao(), this.getQuDao(),
this.getCrisis(),
]).then(() => { ]).then(() => {
this.form.token = this.getToken; this.form.token = this.getToken;
this.form.sGuid = this.$route.query.sGuid; this.form.sGuid = this.$route.query.sGuid;
@ -46,8 +47,12 @@ export default {
this.form.listType = '0'; this.form.listType = '0';
this.form.isSourcetype = 0; this.form.isSourcetype = 0;
this.form.sTitleType = -1; this.form.sTitleType = -1;
let series = this.$route.query.series || []; let series = this.$route.query.series || [];
let qudao = this.$route.query.qudao || []; let qudao = this.$route.query.qudao || [];
this.doFormQudao(qudao);
this.plainOptions5 = this.doQingGanAndCrisis();
this.doFormQS(series);
this.form.sTimeType = 4; this.form.sTimeType = 4;
if (this.form.sStartTime && this.form.sEndTime) { if (this.form.sStartTime && this.form.sEndTime) {
@ -61,8 +66,6 @@ export default {
} else { } else {
this.gValue = x; this.gValue = x;
} }
this.doFormQudao(qudao);
this.doFormQS(series);
this.getTableData(); this.getTableData();
this.getListData(); this.getListData();
}) })
@ -125,16 +128,30 @@ export default {
this.qdCheckAll = this.quDao.length === this.plainOptions.length; this.qdCheckAll = this.quDao.length === this.plainOptions.length;
this.form.sQuDao = this.quDao.toString(); this.form.sQuDao = this.quDao.toString();
} else if (type === "diaoXing") { } else if (type === "diaoXing") {
this.dxIndeterminate = !!this.diaoXing.length && this.diaoXing.length < this.plainOptions1.length; this.dxIndeterminate = !!this.diaoXing.length && this.diaoXing.length < this.plainOptions5.length;
this.dxCheckAll = this.diaoXing.length === this.plainOptions1.length; this.dxCheckAll = this.diaoXing.length === this.plainOptions5.length;
// this.doFormQS(this.diaoXing); this.doFormQS(this.diaoXing);
this.form.sQingGan = this.diaoXing.toString();
// this.form.sQingGan = this.diaoXing.toString();
} }
this.form.iPageIndex = 1; this.form.iPageIndex = 1;
Promise.all([this.getTableData(),this.getListData()]).then(() => { Promise.all([this.getTableData(),this.getListData()]).then(() => {
this.noClick = false; this.noClick = false;
}); });
}, },
// 处理情感和负面等级
doQingGanAndCrisis() {
let arr = [];
let tes = [...this.plainOptions1, ...this.plainOptions3];
tes.forEach((ele) => {
let obj = {
label: ele.label,
value: ele.label,
};
arr.push(obj);
});
return arr;
},
//渠道全选 //渠道全选
onCheckAllChangeQd(e) { onCheckAllChangeQd(e) {
let arr = []; let arr = [];
@ -159,7 +176,7 @@ export default {
//调性全选 //调性全选
onCheckAllChangeDx(e) { onCheckAllChangeDx(e) {
let arr = []; let arr = [];
this.plainOptions1.forEach(ele => { this.plainOptions5.forEach(ele => {
let value = ele.value; let value = ele.value;
arr.push(value) arr.push(value)
}) })

Loading…
Cancel
Save