prod
lily.zhang 3 years ago
parent eac02edfd4
commit fe8a7d65fb

@ -0,0 +1,19 @@
/*
* @Author: your name
* @Date: 2021-10-27 17:08:02
* @LastEditTime: 2021-10-27 17:09:09
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/api/EventInsight/index.js
*/
import httpService from "@/request"
// 热点事件渠道分布
export function getPropagationDirection0528(params) {
let obj = Object.assign({action: 'getPropagationDirection0528', sType: 'HotEvent0528'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'get',
params: obj
})
}

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-20 16:36:08
* @LastEditTime: 2021-10-27 15:41:11
* @LastEditTime: 2021-10-27 19:28:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/api/comm/index.js
@ -75,4 +75,14 @@ export function getToExcelField(params) {
params: obj
})
}
// 导出Excel的方法
export function getExcel(params) {
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: params,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-08 19:12:07
* @LastEditTime: 2021-10-26 17:54:34
* @LastEditTime: 2021-10-28 09:16:12
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edi
* @FilePath: /data-show/src/components/v-echars/index.vue
@ -33,9 +33,7 @@ export default {
} else {
this.myChart.setOption(val);
}
window.onresize = () => {
this.myChart.resize();
};
console.log(this.myChart)
this.myChart.off("click");
//
this.myChart.getZr().on("click", (params) => {
@ -86,7 +84,7 @@ export default {
},
//
roundDefaultSelect(myChart) {
if (myChart.getOption().series[0].type != "pie") {
if (!myChart.getOption().series[0] || myChart.getOption().series[0].type != "pie") {
return;
}
let index = 0;

@ -34,13 +34,13 @@
</a-range-picker>
</div>
<div class="iH-center">
<img src="../../assets/images/Index/img_toubuyi.png" width="100%"/>
<img src="../../assets/images/Index/img_toubuyi.png" width="100%" />
</div>
<div class="iH-right">
<span class="s1">{{ clock }}</span>
<span class="s2">{{ sClock }}</span>
<span class="s2">{{ week }}</span>
<img class="m1" src="../../assets/images/Index/ic_ry.png"/>
<img class="m1" src="../../assets/images/Index/ic_ry.png" />
<span class="s3">{{getUser.UserName}}</span>
<a-dropdown placement="bottomRight">
<a class="ant-dropdown-link">
@ -60,29 +60,30 @@
</template>
<script>
import {getOneTime} from "@/api/comm"
import { getOneTime } from "@/api/comm";
export default {
name: "iHeader",
inject: ['reload'],
inject: ["reload"],
data() {
return {
sTimeType: 1,
selVal: '',
selVal: "",
clock: "",
sClock: "",
week: "",
intDt: null,
selDatas: [
],
selDatas: [],
};
},
created() {
this.getTime(this.getCommTime)
this.getTime(this.getCommTime);
},
mounted() {
this.intDt = self.setInterval(() => {
this.getDatetime();
let obj = this.getDatetime();
this.clock = obj.clock;
this.sClock = obj.sClock;
this.week = obj.week;
}, 1000);
},
destroyed() {
@ -92,80 +93,44 @@ export default {
},
methods: {
handleChange(val) {
this.setCommTime({sTimeType: val});
if(this.sTimeType != this.selVal) {
this.setCommTime({sStartTime: "",sEndTime: ""});
}
this.reload();
},
//
getDatetime() {
let now = new Date();
let weeks = new Array(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"
);
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let clock = year + "-";
let sClock = "";
let dayw = now.getDay();
let week = weeks[dayw];
if (month < 10) clock += "0";
clock += month + "-";
if (day < 10) clock += "0";
clock += day + " ";
if (hh < 10) sClock += "0";
sClock += hh + ":";
if (mm < 10) sClock += "0";
sClock += mm + ":";
if (ss < 10) sClock += "0";
sClock += ss;
this.clock = clock;
this.sClock = sClock;
this.week = week;
return { clock: clock, sClock: sClock, week: week };
this.setCommTime({ sTimeType: val });
if (this.sTimeType != this.selVal) {
this.setCommTime({ sStartTime: "", sEndTime: "" });
}
this.reload();
},
//
handlerMyself() {
this.$router.push("/myself");
},
//
handlerType(obj) {
if(obj.key === 'marketingAnalysis') {
this.setHeaderType(2)
if (obj.key === "marketingAnalysis") {
this.setHeaderType(2);
} else {
this.setHeaderType(1)
this.setHeaderType(1);
}
this.$router.push({path: `/${obj.key}`})
this.$router.push({ path: `/${obj.key}` });
},
//
getTime(commTime) {
getOneTime(commTime).then(res => {
getOneTime(commTime).then((res) => {
this.selDatas = res.data;
if(!this.getCommTime.sTimeType) {
if (!this.getCommTime.sTimeType) {
this.sTimeType = this.selDatas[0].key;
this.setCommTime({sTimeType: this.sTimeType})
this.setCommTime({ sTimeType: this.sTimeType });
} else {
this.sTimeType = this.getCommTime.sTimeType;
}
})
}
});
},
//
handlerChangeTime(val) {
let obj = {
sStartTime: val[0],
sEndTime: val[1]
}
sEndTime: val[1],
};
this.setCommTime(obj);
},
// 退
@ -173,7 +138,7 @@ export default {
this.setToken("");
this.setUser({});
this.$router.replace("/login");
}
},
},
};
</script>
@ -206,7 +171,7 @@ export default {
font-weight: bold;
color: #ffffff;
margin-left: 8px;
margin-top: 2px;
margin-top: 2px;
}
}
.iH-center {
@ -255,8 +220,8 @@ export default {
}
}
.selHead {
width: 120px;
margin-left: 40px;
width: 120px;
margin-left: 40px;
margin-right: 8px;
}
</style>

@ -84,7 +84,10 @@ export default {
},
mounted() {
this.intDt = self.setInterval(() => {
this.getDatetime();
let obj = this.getDatetime();
this.clock = obj.clock;
this.sClock = obj.sClock;
this.week = obj.week;
}, 1000);
},
destroyed() {
@ -114,43 +117,6 @@ export default {
this.setCtime(this.form);
this.reload();
},
//
getDatetime() {
let now = new Date();
let weeks = new Array(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"
);
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let clock = year + "-";
let sClock = "";
let dayw = now.getDay();
let week = weeks[dayw];
if (month < 10) clock += "0";
clock += month + "-";
if (day < 10) clock += "0";
clock += day + " ";
if (hh < 10) sClock += "0";
sClock += hh + ":";
if (mm < 10) sClock += "0";
sClock += mm + ":";
if (ss < 10) sClock += "0";
sClock += ss;
this.clock = clock;
this.sClock = sClock;
this.week = week;
return { clock: clock, sClock: sClock, week: week };
},
//
handlerMyself() {
this.$router.push("/myself");

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:56:13
* @LastEditTime: 2021-10-27 10:36:14
* @LastEditTime: 2021-10-27 19:35:30
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/mixins/index.js
@ -12,13 +12,69 @@ export default {
install(Vue) {
Vue.mixin({
directives: {
'loading': Loading
'loading': Loading
},
computed: {
...mapGetters(['getZoom','getToken', 'getUser', 'getAccount', 'getCommTime', 'getCtime', 'getHeaderType', 'getBrand'])
...mapGetters(['getZoom', 'getToken', 'getUser', 'getAccount', 'getCommTime', 'getCtime', 'getHeaderType', 'getBrand'])
},
methods: {
...mapActions(["setZoom", 'setToken', 'setUser', 'setAccount', 'setCommTime','setCtime', 'setHeaderType', 'setBrand'])
...mapActions(["setZoom", 'setToken', 'setUser', 'setAccount', 'setCommTime', 'setCtime', 'setHeaderType', 'setBrand']),
// 获取当前日期时间
getDatetime() {
let now = new Date();
let weeks = new Array(
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六"
);
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let clock = year + "-";
let sClock = "";
let dayw = now.getDay();
let week = weeks[dayw];
if (month < 10) clock += "0";
clock += month + "-";
if (day < 10) clock += "0";
clock += day + " ";
if (hh < 10) sClock += "0";
sClock += hh + ":";
if (mm < 10) sClock += "0";
sClock += mm + ":";
if (ss < 10) sClock += "0";
sClock += ss;
return { clock: clock, sClock: sClock, week: week };
},
getDatetimeSs() {
let now = new Date();
let year = now.getFullYear();
let month = now.getMonth() + 1;
let day = now.getDate();
let hh = now.getHours();
let mm = now.getMinutes();
let ss = now.getSeconds();
let clock = year + "";
let sClock = "";
if (month < 10) clock += "0";
clock += month + "";
if (day < 10) clock += "0";
clock += day + "";
if (hh < 10) sClock += "0";
sClock += hh + "";
if (mm < 10) sClock += "0";
sClock += mm + "";
if (ss < 10) sClock += "0";
sClock += ss;
return clock+sClock;
},
}
})
}

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-18 09:07:18
* @LastEditTime: 2021-10-18 10:01:35
* @LastEditTime: 2021-10-27 17:16:55
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/EventInsight/hotEventPropagationOriented/index.vue
@ -18,18 +18,36 @@
</template>
<script>
import {getPropagationDirection0528} from "@/api/EventInsight"
import createOpt from "./opt"
export default {
name: "hotEventPO",
data() {
return {
form: {
token: ""
},
opt: createOpt()
}
},
created() {
this.form.token = this.getToken;
this.getData();
},
methods: {
goPath() {
this.$router.push({path: '/eventComparison'})
},
//
getData() {
let obj = Object.assign({}, this.getCommTime, this.form);
getPropagationDirection0528(obj).then(res => {
let data = res.data;
let d1 = data.data;
let d2 = data.links;
this.opt = createOpt(d1, d2);
console.log(res)
})
}
}
};

@ -1,62 +1,62 @@
/*
* @Author: your name
* @Date: 2021-10-13 09:09:51
* @LastEditTime: 2021-10-18 09:32:36
* @LastEditTime: 2021-10-27 17:32:39
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/EventDetails/hotEventPropagationOriented/opt.js
*/
const citylist = [
{name: '领导人'},
{name: '自然'},
{name: '明星代言人'},
{name: '车展'},
{name: '新车上市'},
{name: '新闻'},
{name: '论坛'},
{name: '微博'},
{name: 'APP'},
{name: '短视频'},
{name: '吉利'},
{name: '奔驰'},
{name: '宝马'},
{name: '特斯拉'},
{name: '奥迪'},
{name: '女车主表态'},
{name: '广州车展'},
{name: '销量大增'},
];
const population=[
{source: "领导人", target: "APP", value: 2000},
{source: "APP", target: "宝马", value: 3000},
//
{source: "明星代言人", target: "论坛", value: 1000},
//
{source: "自然", target: "论坛", value: 2100},
{source: "论坛", target: "宝马", value: 3100},
{source: "宝马", target: "广州车展", value: 5100},
//
{source: "自然", target: "新闻", value: 3234},
{source: "新闻", target: "吉利", value: 3000},
{source: "吉利", target: "销量大增", value: 6000},
//
{source: "车展", target: "微博", value: 1234},
{source: "微博", target: "特斯拉", value: 3234},
{source: "特斯拉", target: "销量大增", value: 4234},
//
{source: "新车上市", target: "APP", value: 1234},
{source: "APP", target: "宝马", value: 1234},
//
{source: "新车上市", target: "短视频", value: 2234},
{source: "短视频", target: "奔驰", value: 2234},
{source: "奔驰", target: "广州车展", value: 2234},
//
{source: "APP", target: "奥迪", value: 2234},
{source: "奥迪", target: "销量大增", value: 2234},
//
{source: "奔驰", target: "女车主表态", value: 5234},
];
export default function createOpt() {
// const citylist = [
// {name: '领导人'},
// {name: '自然'},
// {name: '明星代言人'},
// {name: '车展'},
// {name: '新车上市'},
// {name: '新闻'},
// {name: '论坛'},
// {name: '微博'},
// {name: 'APP'},
// {name: '短视频'},
// {name: '吉利'},
// {name: '奔驰'},
// {name: '宝马'},
// {name: '特斯拉'},
// {name: '奥迪'},
// {name: '女车主表态'},
// {name: '广州车展'},
// {name: '销量大增'},
// ];
// const population=[
// {source: "领导人", target: "APP", value: 2000},
// {source: "APP", target: "宝马", value: 3000},
// //
// {source: "明星代言人", target: "论坛", value: 1000},
// //
// {source: "自然", target: "论坛", value: 2100},
// {source: "论坛", target: "宝马", value: 3100},
// {source: "宝马", target: "广州车展", value: 5100},
// //
// {source: "自然", target: "新闻", value: 3234},
// {source: "新闻", target: "吉利", value: 3000},
// {source: "吉利", target: "销量大增", value: 6000},
// //
// {source: "车展", target: "微博", value: 1234},
// {source: "微博", target: "特斯拉", value: 3234},
// {source: "特斯拉", target: "销量大增", value: 4234},
// //
// {source: "新车上市", target: "APP", value: 1234},
// {source: "APP", target: "宝马", value: 1234},
// //
// {source: "新车上市", target: "短视频", value: 2234},
// {source: "短视频", target: "奔驰", value: 2234},
// {source: "奔驰", target: "广州车展", value: 2234},
// //
// {source: "APP", target: "奥迪", value: 2234},
// {source: "奥迪", target: "销量大增", value: 2234},
// //
// {source: "奔驰", target: "女车主表态", value: 5234},
// ];
export default function createOpt(citylist=[],population=[]) {
return {
tooltip: {
trigger: "item",
@ -90,7 +90,7 @@ export default function createOpt() {
label: {
color: "#fff",
fontWeight: 'bold',
fontSize: 14
fontSize: 10
}
}
]

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-11 14:11:04
* @LastEditTime: 2021-10-27 16:53:57
* @LastEditTime: 2021-10-27 18:43:03
* @LastEditors: Please set LastEditors
* @Description: 行业数据导出
* @FilePath: /data-show/src/views/IndustryDataExport/index.vue
@ -50,15 +50,15 @@
</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 :label-col="{ span: 3 }" :wrapper-col="{ span: 8 }">
<a-form :form="execlForm" :label-col="{ span: 3 }" :wrapper-col="{ span: 8 }">
<a-form-item label="文件名称">
<a-input placeholder="请输入文件名称"></a-input>
<a-input v-model="execlForm.sFileName" disabled placeholder="请输入文件名称"></a-input>
</a-form-item>
<a-form-item label="导出格式">
<span style="color: #63aecc; font-size: 14px">xlsz</span>
</a-form-item>
<a-form-item label="导出字段" :wrapper-col="{ span: 21 }">
<a-checkbox-group v-model="value1" :options="plainOptions4" @change="onChange" />
<a-checkbox-group v-model="checkedIds" :options="plainOptions4" @change="fileTypeChange" />
</a-form-item>
<a-form-item label="导出条数">
<span style="color: #63aecc; font-size: 14px">{{secIds.length}}</span>
@ -67,7 +67,7 @@
</div>
<div slot="footer">
<div class="epor" align="center">
<div class="epor-btn"></div>
<div class="epor-btn" @click="exportExcel"></div>
</div>
</div>
</v-modal>
@ -88,7 +88,7 @@ export default {
gValue: 0,
selVal: 4,
selTime: [],
value1: [],
checkedIds: [],
form: {
action: "",
sType: "",
@ -152,7 +152,14 @@ export default {
rowSelection: null,
selectedRows: [],
selectedRowKeys: "",
secIds: []
secIds: [],
execlForm: {
action: "toExcel",
sFileName: "",
sCheckedIds: "",
iNum: "",
sField: ""
}
};
},
created() {

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-27 15:29:37
* @LastEditTime: 2021-10-27 16:53:08
* @LastEditTime: 2021-10-27 19:37:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/IndustryDataExport/tableEvent.js
@ -23,7 +23,7 @@ function rowSelection(that) {
// },
}
}
import {getExcel} from "@/api/comm"
export default {
// 初始化页面
initDoc() {
@ -79,9 +79,24 @@ export default {
this.noClick = false;
});
},
// 选择导出接口
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);
},
// 导出弹框
handlerExport() {
this.getToExcelField(this.form.sType, this.form.token).then(() => {
this.execlForm.sFileName = this.form.sBrand+'洞察-'+ this.getDatetimeSs();
this.execlForm.sCheckedIds = this.secIds.toString();
this.execlForm.iNum = this.secIds.length;
this.modalObj.visible = true;
})
},
@ -160,4 +175,25 @@ export default {
this.pagination.current = iPageIndex;
this.getTable();
},
// 导出时将对象合并
mergeForm() {
let wKey = ['action', 'iPageIndex', 'iPageSize'];
for(let key in this.form) {
if(!wKey.includes(key)) {
this.execlForm[key] = this.form[key]
}
}
},
exportExcel() {
if(this.execlForm.iNum) {
this.mergeForm();
getExcel(this.execlForm).then(() => {
this.$notification.open({
message: `数据生成中`,
description: '请前往个人中心查看下载进度',
placement:'bottomRight',
});
})
}
}
}

Loading…
Cancel
Save