prod
lily.zhang 3 years ago
parent a75aa91e0c
commit bd729954ef

@ -0,0 +1,23 @@
/*
* @Author: your name
* @Date: 2021-10-28 16:40:48
* @LastEditTime: 2021-10-28 19:09:07
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/api/ModelInsight/index.js
*/
import httpService from "@/request"
// 车型数据-数据传播总量
export function getBrandOverviewCount0528(params) {
let obj = Object.assign({action: 'getBrandOverviewCount0528', sType: 'BrandOverview'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-20 16:36:08
* @LastEditTime: 2021-10-28 13:14:08
* @LastEditTime: 2021-10-28 17:12:56
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/api/comm/index.js
@ -83,7 +83,18 @@ export function getUserBrand(params) {
}
})
}
// 根据品牌车型列表
export function getUserSeriesName(params) {
let obj = Object.assign({action: 'getUserSeriesName'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
// 获取导出字段
export function getToExcelField(params) {
let obj = Object.assign({action: 'getToExcelField'}, params)

@ -66,7 +66,7 @@ export default {
inject: ["reload"],
data() {
return {
sTimeType: 1,
sTimeType: 34,
selVal: "",
clock: "",
sClock: "",
@ -76,7 +76,7 @@ export default {
};
},
created() {
this.getTime(this.getCommTime);
this.getTime();
},
mounted() {
this.intDt = self.setInterval(() => {
@ -94,12 +94,8 @@ export default {
methods: {
handleChange(val) {
this.setCommTime({ sTimeType: val });
if (this.sTimeType != this.selVal) {
this.setCommTime({ sStartTime: "", sEndTime: "" });
}
this.reload();
},
//
handlerMyself() {
this.$router.push("/myself");
@ -108,31 +104,23 @@ export default {
handlerType(obj) {
if (obj.key === "marketingAnalysis") {
this.setHeaderType(2);
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight') {
this.setHeaderType(3);
} else {
this.setHeaderType(1);
}
this.$router.push({ path: `/${obj.key}` });
},
//
getTime(commTime) {
getOneTime(commTime).then((res) => {
getTime() {
getOneTime().then((res) => {
this.selDatas = res.data;
if (!this.getCommTime.sTimeType) {
this.sTimeType = this.selDatas[0].key;
this.setCommTime({ sTimeType: this.sTimeType });
} else {
this.sTimeType = this.getCommTime.sTimeType;
}
});
},
//
handlerChangeTime(val) {
let obj = {
sStartTime: val[0],
sEndTime: val[1],
};
this.setCommTime(obj);
},
// 退
layout() {
this.setToken("");

@ -0,0 +1,269 @@
<template>
<div class="iH-outter">
<div class="iH-left">
<a-dropdown placement="bottomLeft">
<img class="iH-left-img1" src="../../assets/images/Index/ic_cd.png" />
<a-menu slot="overlay" @click="handlerType">
<a-menu-item key="index">
<span>行业洞察</span>
</a-menu-item>
<a-menu-item key="brandInsight">
<span>品牌洞察</span>
</a-menu-item>
<a-menu-item key="modelInsight">
<span>车型洞察</span>
</a-menu-item>
<a-menu-item key="eventInsight">
<span>事件洞察</span>
</a-menu-item>
<a-menu-item key="marketingAnalysis">
<span>营销分析</span>
</a-menu-item>
</a-menu>
</a-dropdown>
<span class="iH-left-s1">菜单</span>
<a-select :default-value="1" :size="$vuiSize" class="selHead" v-model="form.sTimeType" @change="handleChange">
<a-select-option :style="{ color: '#fff' }" v-for="item in selDatas" :value="item.key" :key="item.key">
{{ item.value }}
</a-select-option>
</a-select>
<a-range-picker v-model="selTime" :disabled-date="disabledDate" style="margin-left: 0.8rem" @calendarChange="calendarPriceRangeChange" :size="$vuiSize" valueFormat="YYYY-MM-DD" v-if="form.sTimeType == selVal" @change="handlerChangeTime">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
</div>
<div class="iH-center">
<img src="../../assets/images/Index/img_toubuyi.png" width="100%" height="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" />
<span class="s3">{{getUser.UserName}}</span>
<a-dropdown placement="bottomRight">
<a class="ant-dropdown-link">
<a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item @click="handlerMyself">
<span>个人中心</span>
</a-menu-item>
<a-menu-item @click="layout">
<span>退出</span>
</a-menu-item>
</a-menu>
</a-dropdown>
</div>
</div>
</template>
<script>
import { getTwoTime } from "@/api/comm";
import moment from "moment";
export default {
name: "iHeaderMa",
inject: ["reload"],
data() {
return {
selVal: 4,
clock: "",
sClock: "",
week: "",
intDt: null,
selTime: [],
selectPriceDate: "",
form: {
sTimeType: "",
sStartTime: "",
sEndTime: "",
},
selDatas: [],
offsetDays: 86400000 * 30, //7
};
},
created() {
this.form = Object.assign(this.form, this.getCtime2);
if(this.form.sStartTime && this.form.sEndTime) {
this.selTime = [this.form.sStartTime, this.form.sEndTime]
}
this.getSelect();
},
mounted() {
this.intDt = self.setInterval(() => {
let obj = this.getDatetime();
this.clock = obj.clock;
this.sClock = obj.sClock;
this.week = obj.week;
}, 1000);
},
destroyed() {
if (this.intDt) {
self.clearInterval(this.intDt);
}
},
methods: {
//
getSelect() {
getTwoTime().then((res) => {
this.selDatas = res.data;
if (!this.form.sTimeType) {
this.form.sTimeType = this.selDatas[0].key;
this.setCtime2(this.form);
}
});
},
//
handleChange() {
this.setCtime2(this.form);
if (this.form.sTimeType != 4) {
this.reload();
}
},
///
calendarPriceRangeChange(date) {
this.selectPriceDate = date[0];
},
//
handlerChangeTime(val) {
this.form.sStartTime = val[0];
this.form.sEndTime = val[1];
this.selectPriceDate = "";
this.setCtime2(this.form);
this.reload();
},
//
handlerMyself() {
this.$router.push("/myself");
},
//
handlerType(obj) {
if (obj.key === "marketingAnalysis") {
this.setHeaderType(2);
} else if (
obj.key === "brandInsight" ||
obj.key === "modelInsight"
) {
this.setHeaderType(3);
} else {
this.setHeaderType(1);
}
this.$router.push({ path: `/${obj.key}` });
},
// 退
layout() {
this.setToken("");
this.setUser({});
this.$router.replace("/login");
},
///
disabledDate(current) {
if (this.selectPriceDate) {
let selectV = moment(
this.selectPriceDate,
"YYYY-MM-DD"
).valueOf();
return (
current >
moment(
new Date(selectV + this.offsetDays),
"YYYY-MM-DD"
) ||
current <
moment(
new Date(selectV - this.offsetDays),
"YYYY-MM-DD"
)
);
} else {
return false;
}
},
},
};
</script>
<style lang="less" scoped>
.iH-outter {
display: flex;
justify-content: space-between;
width: 100%;
height: auto;
background-image: url("../../assets/images/Index/img_toubuer.png");
background-repeat: no-repeat;
background-size: cover;
.iH-left {
display: flex;
height: 100%;
margin-left: 16px;
justify-content: flex-start;
margin-top: 18px;
width: 630px;
.iH-left-img1 {
width: 24px;
height: 24px;
cursor: pointer;
}
.iH-left-s1 {
display: block;
font-size: 14px;
font-weight: bold;
color: #ffffff;
margin-left: 8px;
margin-top: 2px;
}
}
.iH-center {
width: 606px;
height: auto;
}
.iH-right {
display: flex;
width: 630px;
height: 100%;
justify-content: flex-end;
margin-right: 16px;
margin-top: 18px;
.s1 {
display: inline-block;
font-size: 16px;
color: #ffffff;
}
.s2 {
display: inline-block;
font-size: 16px;
color: #ffffff;
margin-left: 24px;
}
.s3 {
display: inline-block;
font-size: 14px;
color: #ffffff;
margin-left: 8px;
}
.m1 {
display: inline-block;
margin-left: 60px;
margin-right: 8px;
width: 24px;
height: 24px;
}
}
}
.ant-dropdown-link {
color: #63aecc;
margin-left: 11px;
/deep/ .anticon svg {
font-size: 20px !important;
margin-top: 0px;
}
}
.selHead {
width: 120px;
margin-left: 40px;
margin-right: 8px;
}
</style>

@ -123,10 +123,12 @@ export default {
},
//
handlerType(obj) {
if(obj.key === 'marketingAnalysis') {
this.setHeaderType(2)
if (obj.key === "marketingAnalysis") {
this.setHeaderType(2);
} else if(obj.key === 'brandInsight' || obj.key === 'modelInsight') {
this.setHeaderType(3);
} else {
this.setHeaderType(1)
this.setHeaderType(1);
}
this.$router.push({path: `/${obj.key}`})
},

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-13 14:25:26
* @LastEditTime: 2021-10-26 10:28:52
* @LastEditTime: 2021-10-28 19:51:48
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iLayout/index.vue
@ -10,6 +10,7 @@
<div class="layout-container">
<iHeader v-if="getHeaderType == 1"></iHeader>
<iHeaderMa v-if="getHeaderType == 2"></iHeaderMa>
<iHeaderBrand v-if="getHeaderType == 3"></iHeaderBrand>
<div class="layout-body">
<vue-scroll>
<router-view v-if="isRouterAlive"></router-view>

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-15 09:16:31
* @LastEditTime: 2021-10-27 11:31:33
* @LastEditTime: 2021-10-28 18:30:26
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue
@ -21,7 +21,7 @@
<div class="sb-dd">
<vue-scroll>
<div class="sb-bd">
<div class="s-item" :class="showActive === item.brandid ? 's-item-active': ''" v-for="(item,index) in showCars" :key="index" @click="handlerChoose(index,item)">
<div class="s-item" :class="brandname === item.brandname ? 's-item-active': ''" v-for="(item,index) in showCars" :key="index" @click="handlerChoose(index,item)">
<div class="d1">
<img class="m1" :src="item.img">
</div>
@ -39,7 +39,7 @@
</template>
<script>
import { getUserBrand } from "@/api/comm";
import { getUserBrand,getUserSeriesName } from "@/api/comm";
export default {
name: "iSwitchBrand",
props: {
@ -47,6 +47,10 @@ export default {
type: Boolean,
default: false,
},
brand: {
type: String,
default: ""
}
},
watch: {
visible: {
@ -57,8 +61,13 @@ export default {
},
},
created() {
this.brandname = this.brand;
this.getBrands().then(() => {
this.handlerLi(0);
let row = this.cars.find(ele => {
return ele.brandname === this.brandname;
})
this.chooseBrand = row;
});
},
data() {
@ -99,7 +108,10 @@ export default {
cars: [],
showCars: [],
showActive: "",
chooseBrand: {},
chooseBrand: null,
chooseModel: null,
models: [],
brandname: ""
};
},
methods: {
@ -130,15 +142,28 @@ export default {
//
handlerChoose(n, row) {
this.showActive = row.brandid;
this.chooseBrand = Object.assign(
this.chooseBrand,
this.showCars[n]
);
this.chooseBrand = row;
this.brandname = this.chooseBrand.brandname;
this.getUserSeriesName(this.brandname);
},
//
getUserSeriesName(brandName) {
this.form.token = this.getToken;
this.form.sBrandName = brandName;
getUserSeriesName(this.form).then(res => {
let data = res.data || [];
this.models = data;
this.chooseModel = this.models[0];
})
},
//
handlerSubmit() {
this.$emit("change", this.chooseBrand);
this.handlerClose();
if(this.chooseBrand && this.chooseModel) {
this.$emit("change", [this.chooseBrand,this.chooseModel]);
this.handlerClose();
} else {
this.$message.warning('请选择品牌');
}
},
},
};

@ -0,0 +1,342 @@
<!--
* @Author: your name
* @Date: 2021-10-15 09:16:31
* @LastEditTime: 2021-10-28 18:48:18
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue
-->
<template>
<div class="sb-outter" v-if="show">
<div class="sb-inner">
<v-label-div title="车型切换">
<span class="iconfont icon-guanbi v-m-close" @click="handlerClose"></span>
</v-label-div>
<div class="sb-d">
<ul class="sb-ul">
<span class="liSn">按品牌拼音首字母查找:</span>
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
</ul>
<div style="clear: both"></div>
<div class="sb-body">
<div class="sb-dd">
<vue-scroll>
<div class="sb-bd">
<div class="s-item" :class="brandname === item.brandname ? 's-item-active': ''" v-for="(item,index) in showCars" :key="index" @click="handlerChoose(index,item)">
<div class="d1">
<img class="m1" :src="item.img">
</div>
<span class="s1">{{item.brandname}}</span>
</div>
</div>
</vue-scroll>
</div>
<div class="sb-dd-right">
<vue-scroll>
<div class="sb-bd">
<div class="sb-b-item" :class="modelName === item.name ? 'sb-b-item-active': ''" v-for="(item,index) in models" :key="index" @click="handlerModel(index, item)">{{item.name}}</div>
</div>
</vue-scroll>
</div>
</div>
</div>
<div class="sb-footer" align="center">
<img class="m1" src="../../assets/images/BrandInsight/btn-01.png" @click="handlerSubmit">
</div>
</div>
</div>
</template>
<script>
import { getUserBrand, getUserSeriesName } from "@/api/comm";
export default {
name: "iSwitchModel",
props: {
visible: {
type: Boolean,
default: false,
},
brand: {
type: String,
default: ""
},
model: {
type: String,
default: ""
}
},
watch: {
visible: {
handler(val) {
this.show = val ? true : false;
},
immediate: true,
},
},
created() {
this.brandname = this.brand;
this.modelName = this.model;
this.getBrands().then(() => {
this.handlerLi(0);
let row = this.cars.find(ele => {
return ele.brandname === this.brandname
})
this.chooseBrand = row;
});
this.getUserSeriesName(this.brandname);
},
data() {
return {
show: false,
activeLi: 0,
form: {
token: "",
sBrandName: ""
},
letterArr: [
"热门",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"V",
"W",
"X",
"Y",
"Z",
],
cars: [],
models: [],
showCars: [],
showActive: "",
chooseBrand: null,
chooseModel: null,
modelName: "",
brandname: ""
};
},
methods: {
//
handlerClose() {
this.show = false;
this.$emit("update:visible", this.show);
},
// li
handlerLi(n) {
this.activeLi = n;
let key = this.letterArr[n];
this.showCars = this.cars.filter((ele) => ele.firstword === key);
},
//
getBrands() {
return new Promise((resolve, reject) => {
this.form.token = this.getToken;
getUserBrand(this.form)
.then((res) => {
let data = res.data;
this.cars = data;
resolve(true);
})
.catch(() => {
reject(false);
});
});
},
//
handlerChoose(n, row) {
this.showActive = row.brandid;
this.chooseBrand = row;
this.brandname = this.chooseBrand.brandname;
this.getUserSeriesName(this.brandname)
},
//
handlerModel(n, row) {
this.modelName = row.name;
this.chooseModel = row;
},
//
handlerSubmit() {
if(this.chooseBrand && this.chooseModel) {
this.$emit("change", [this.chooseBrand, this.chooseModel]);
this.handlerClose();
} else {
this.$message.warning('请选择车型');
}
},
//
getUserSeriesName(brandName) {
this.form.token = this.getToken;
this.form.sBrandName = brandName;
getUserSeriesName(this.form).then(res => {
let data = res.data || [];
this.models = data
})
}
},
};
</script>
<style lang="less" scoped>
.sb-body {
width: 100%;
height: calc(100% - 30px);
display: flex;
justify-content: flex-start;
}
.sb-outter {
position: fixed;
width: 100%;
height: 100%;
z-index: 1000;
top: 0px;
left: 0px;
background-color: rgba(0, 0, 0, 0.45);
overflow: auto;
.sb-inner {
position: absolute;
width: 1230px;
height: 720px;
top: 0px;
left: 50%;
border-radius: 2px;
transform: translate(-50%, 90px);
background: #0c2342;
min-width: 400px;
min-height: 300px;
.sb-d {
width: 100%;
height: calc(100% - 128px);
overflow: hidden;
}
.sb-ul {
margin: 0px;
padding: 0px;
list-style: none;
margin-left: 16px;
margin-top: 10px;
height: 30px;
.liSn {
float: left;
color: #fff;
font-size: 16px;
margin-right: 24px;
}
li {
float: left;
color: #fff;
font-size: 16px;
margin-right: 24px;
cursor: pointer;
&:hover {
color: #3373cc;
}
}
.lactive {
color: #3373cc;
}
}
.sb-dd {
width: 46%;
height: 100%;
box-shadow: 0 0 20px;
}
.sb-bd {
padding: 0px 16px 16px 16px;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
.s-item {
cursor: pointer;
margin-left: 16px;
margin-top: 16px;
transition: all 0.3s;
border: 1px solid transparent;
&:hover {
border: 1px solid #3373cc;
}
.d1 {
width: 152px;
height: 132px;
background: #fff;
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
}
.m1 {
width: 90px;
}
.s1 {
display: block;
text-align: center;
font-size: 16px;
color: #fff;
}
}
.s-item-active {
border: 1px solid #3373cc;
}
.sb-b-item {
width: 194px;
height: 66px;
background: #1B4163;
color: #fff;
border-radius: 2px;
font-size: 20px;
text-align: center;
line-height: 66px;
margin-left: 16px;
margin-top: 16px;
transition: all 0.3s;
cursor: pointer;
&:hover {
background: #3373CC;
color: #fff;
}
}
.sb-b-item-active {
background: #3373CC;
color: #fff;
}
}
.sb-dd-right {
width: 54%;
height: 100%;
box-shadow: 0 0 20px;
}
.sb-footer {
position: absolute;
width: 100%;
height: 80px;
bottom: 0px;
left: 0px;
border-top: 1px solid #1e3d64;
.m1 {
width: 480px;
height: 100%;
cursor: pointer;
}
}
}
}
</style>

@ -1,21 +1,25 @@
/*
* @Author: your name
* @Date: 2021-10-12 10:28:00
* @LastEditTime: 2021-10-26 10:06:13
* @LastEditTime: 2021-10-28 19:51:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/components/index.js
*/
import iHeader from "@/lycomponents/iHeader";
import iSwitchBrand from "@/lycomponents/iSwitchBrand";
import iSwitchModel from "@/lycomponents/iSwitchModel";
import iHeaderMa from "@/lycomponents/iHeaderMa"
import iHeaderBrand from "@/lycomponents/iHeaderBrand"
export default {
install(Vue) {
Vue.mixin({
components: {
iHeader,
iSwitchBrand,
iHeaderMa
iHeaderMa,
iSwitchModel,
iHeaderBrand
}
})
}

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:56:13
* @LastEditTime: 2021-10-28 13:01:22
* @LastEditTime: 2021-10-28 19:41:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/mixins/index.js
@ -15,10 +15,10 @@ export default {
'loading': Loading
},
computed: {
...mapGetters(['getZoom', 'getToken', 'getUser', 'getAccount', 'getCommTime', 'getCtime', 'getHeaderType', 'getBrand'])
...mapGetters(['getZoom', 'getToken', 'getUser', 'getAccount', 'getCommTime', 'getCtime','getCtime2', 'getHeaderType', 'getBrand', 'getModel'])
},
methods: {
...mapActions(["setZoom", 'setToken', 'setUser', 'setAccount', 'setCommTime', 'setCtime', 'setHeaderType', 'setBrand']),
...mapActions(["setZoom", 'setToken', 'setUser', 'setAccount', 'setCommTime', 'setCtime','setCtime2', 'setHeaderType', 'setBrand', 'setModel']),
// 获取当前日期时间
getDatetime() {
let now = new Date();

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:36:49
* @LastEditTime: 2021-10-27 10:28:48
* @LastEditTime: 2021-10-28 19:34:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/actions.js
@ -25,11 +25,17 @@ const actions = {
setCtime: ({commit}, log) => {
commit('setCtime', log)
},
setCtime2: ({commit}, log) => {
commit('setCtime2', log)
},
setHeaderType: ({commit}, log) => {
commit('setHeaderType', log)
},
setBrand: ({commit}, log) => {
commit('setBrand', log)
},
setModel: ({commit}, log) => {
commit('setModel', log)
}
}
export default actions

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:37:06
* @LastEditTime: 2021-10-27 10:33:07
* @LastEditTime: 2021-10-28 19:36:01
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/getters.js
@ -25,11 +25,17 @@ const getters = {
getCtime(state) {
return state.ctime
},
getCtime2(state) {
return state.ctime2
},
getHeaderType(state) {
return state.headerType
},
getBrand(state) {
return state.brand
},
getModel(state) {
return state.model
}
}
export default getters

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:37:35
* @LastEditTime: 2021-10-27 10:31:55
* @LastEditTime: 2021-10-28 19:35:17
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/mutations.js
@ -36,6 +36,12 @@ const mutations = {
let str = JSON.stringify(obj);
sessionStorage.setItem('ctime', str);
},
setCtime2: (state, log) => {
let obj = Object.assign(state.ctime2, log);
state.ctime2 = obj;
let str = JSON.stringify(obj);
sessionStorage.setItem('ctime2', str);
},
setHeaderType: (state, log) => {
state.headerType = log;
sessionStorage.setItem('headerType', log);
@ -45,7 +51,14 @@ const mutations = {
state.brand = obj;
let str = JSON.stringify(obj);
sessionStorage.setItem('brand', str);
}
},
setModel: (state, log) => {
let obj = Object.assign(state.model, log);
state.model = obj;
let str = JSON.stringify(obj);
sessionStorage.setItem('model', str);
},
}
export default mutations;

@ -1,24 +1,22 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:37:50
* @LastEditTime: 2021-10-27 10:32:21
* @LastEditTime: 2021-10-28 19:34:13
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/state.js
*/
let commTime = {
sStartTime: "",
sEndTime: "",
sTimeType: ''
}
const state = {
$zoom: 1,
token: sessionStorage.getItem('token') || "",
user: JSON.parse(sessionStorage.getItem('user')) || {},
account: JSON.parse(localStorage.getItem('account')) || {},
commTime: JSON.parse(sessionStorage.getItem('commTime')) || commTime,
commTime: JSON.parse(sessionStorage.getItem('commTime')) || {},
ctime: JSON.parse(sessionStorage.getItem('ctime')) || {},
ctime2: JSON.parse(sessionStorage.getItem('ctime2')) || {},
headerType: sessionStorage.getItem('headerType') || 1,
brand: JSON.parse(sessionStorage.getItem('brand')) || {}
brand: JSON.parse(sessionStorage.getItem('brand')) || {},
model: JSON.parse(sessionStorage.getItem('model')) || {},
}
export default state;

@ -205,5 +205,15 @@
.ant-table-tbody > tr.ant-table-row-selected td {
background: #2668c2 !important;
}
.ant-popover-inner {
background: #08182e !important;
box-shadow: 0px 0px 10px 0px #3373CC !important;
}
.ant-popover-inner-content{
padding:0 !important;
}
.ant-popover-title {
padding:10px !important;
border-bottom: 1px solid #173b6d !important;
color: #fff !important;
}

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-11 18:42:58
* @LastEditTime: 2021-10-27 10:48:07
* @LastEditTime: 2021-10-28 16:21:27
* @LastEditors: Please set LastEditors
* @Description: 品牌数据
* @FilePath: /data-show/src/views/BrandInsight/brandData/index.vue
@ -16,7 +16,15 @@
<img class="m1" src="../../../assets/images/BrandInsight/ic_cb.png" />
<span class="s1">传播数据总量</span>
</div>
<span class="s2">{{count}}</span>
<a-popover title="传播数据">
<template slot="content">
<div class="pd-item" v-for="(item,index) in countArr" :key="index">
<span>{{item.key}}</span>
<span>{{item.value}}</span>
</div>
</template>
<span class="s2">{{count}}</span>
</a-popover>
</div>
<div class="bd-o-d1" style="margin-top: 16px">
<div class="d1">
@ -49,6 +57,7 @@ export default {
return {
width: 274,
count: 0,
countArr: [],
load: false,
form: {
token: "",
@ -66,10 +75,12 @@ export default {
this.form.token = this.getToken;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.load = true;
Promise.all([this.getBrandOverviewCount0528(), this.getAffections()]).then(() => {
this.load = false;
})
Promise.all([
this.getBrandOverviewCount0528(),
this.getAffections(),
]).then(() => {
this.load = false;
});
},
methods: {
getBrandOverviewCount0528() {
@ -78,6 +89,7 @@ export default {
getBrandOverviewCount0528(obj)
.then((res) => {
this.count = res.data.count;
this.countArr = res.data.data || []
resolve(true);
})
.catch(() => {
@ -88,19 +100,21 @@ export default {
getAffections() {
return new Promise((resolve, reject) => {
let obj = Object.assign({}, this.getCommTime, this.form);
getAffections(obj).then((res) => {
let data = res.data || {};
this.affObj.a = data["正面"] || 0;
this.affObj.b = data["中性"] || 0;
this.affObj.c = data["负面"] || 0;
this.affObj.z =
this.affObj.a * 1 +
this.affObj.b * 1 +
this.affObj.c * 1;
resolve(true)
}).catch(() => {
reject(false)
});
getAffections(obj)
.then((res) => {
let data = res.data || {};
this.affObj.a = data["正面"] || 0;
this.affObj.b = data["中性"] || 0;
this.affObj.c = data["负面"] || 0;
this.affObj.z =
this.affObj.a * 1 +
this.affObj.b * 1 +
this.affObj.c * 1;
resolve(true);
})
.catch(() => {
reject(false);
});
});
},
},
@ -161,5 +175,12 @@ export default {
}
}
}
.pd-item {
display: flex;
justify-content: space-between;
color: #fff;
border-bottom: 1px solid #173b6d;
padding: 10px;
}
</style>

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-11 17:59:49
* @LastEditTime: 2021-10-27 10:55:53
* @LastEditTime: 2021-10-28 18:37:20
* @LastEditors: Please set LastEditors
* @Description: 品牌洞察
* @FilePath: /data-show/src/views/BrandInsight/index.vue
@ -65,7 +65,7 @@
</div>
</div>
</div>
<iSwitchBrand :visible.sync="brandShow" @change="handlerBrand"></iSwitchBrand>
<iSwitchBrand :brand="brand" :visible.sync="brandShow" @change="handlerBrand"></iSwitchBrand>
</div>
</template>
@ -122,8 +122,9 @@ export default {
this.brandShow = true;
},
//
handlerBrand(row) {
this.setBrand(row);
handlerBrand(arr) {
this.setBrand(arr[0]);
this.setModel(arr[1]);
this.reload();
}
}

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-12 10:50:44
* @LastEditTime: 2021-10-28 13:23:54
* @LastEditTime: 2021-10-28 19:07:15
* @LastEditors: Please set LastEditors
* @Description: 热门事件列表
* @FilePath: /data-show/src/views/BrandInsight/popularEventsList/index.vue
@ -30,9 +30,7 @@ export default {
iPageIndex: 1,
iPageSize: 100,
},
config: {
},
config: {},
};
},
created() {
@ -58,7 +56,7 @@ export default {
});
this.config = {
headerBGC: "#1b4062",
oddRowBGC: "#090f4d",
oddRowBGC: "#173b6d",
evenRowBGC: "rgba(69, 149, 244, 0)",
columnWidth: [400],
rowNum: 5,

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 09:17:42
* @LastEditTime: 2021-10-28 12:26:41
* @LastEditTime: 2021-10-28 19:03:45
* @LastEditors: Please set LastEditors
* @Description: 行业洞察
* @FilePath: /data-show/src/views/Index/index.vue
@ -32,7 +32,7 @@
<!--对话框-->
<v-modal :eleStyle="{ width: '86rem', height: '50rem' }" :visible.sync="modalObj.visible" :title="modalObj.title">
<div slot="body" :style="{padding: '16px'}">
<v-table :columns="columns" :data="tbData" :loading="tableLoading" row-key="id">
<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>

@ -45,7 +45,7 @@ export default {
});
this.config = {
headerBGC: "#1b4062",
oddRowBGC: "#090f4d",
oddRowBGC: "#173b6d",
evenRowBGC: "rgba(69, 149, 244, 0)",
columnWidth: [230],
rowNum: 5,

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-11 14:11:04
* @LastEditTime: 2021-10-28 13:11:43
* @LastEditTime: 2021-10-28 20:55:03
* @LastEditors: Please set LastEditors
* @Description: 行业数据导出
* @FilePath: /data-show/src/views/IndustryDataExport/index.vue
@ -17,7 +17,7 @@
<div class="ide-d1-dd1">
<span class="s1">时间</span>
<v-tab-group :value="gValue" :style="{ background: 'transparent' }" :btns="btnTimes" @change="handlerTime"></v-tab-group>
<a-range-picker v-model="selTime" style="margin-left: 12px" :size="$vuiSize" valueFormat="YYYY-MM-DD" v-if="form.sTimeType == selVal" @change="handlerChangeTime">
<a-range-picker v-model="selTime" style="margin-left: 0.8rem" :disabled-date="disabledDate" @calendarChange="calendarPriceRangeChange" :size="$vuiSize" valueFormat="YYYY-MM-DD" v-if="form.sTimeType == selVal" @change="handlerChangeTime">
<a-icon slot="suffixIcon" type="calendar" />
</a-range-picker>
</div>
@ -101,6 +101,8 @@ export default {
selVal: 4,
selTime: [],
checkedIds: [],
selectPriceDate: "",
offsetDays: 86400000 * 30, //7
form: {
action: "",
sType: "",

@ -1,11 +1,12 @@
/*
* @Author: your name
* @Date: 2021-10-27 15:29:37
* @LastEditTime: 2021-10-28 13:10:59
* @LastEditTime: 2021-10-28 20:55:12
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/IndustryDataExport/tableEvent.js
*/
import moment from "moment";
function rowSelection(that) {
return {
onChange: (selectedRowKeys, selectedRows) => {
@ -171,6 +172,7 @@ export default {
handlerChangeTime(val) {
this.form.sStartTime = val[0];
this.form.sEndTime = val[1];
this.selectPriceDate = "";
this.getTable();
this.getList();
},
@ -240,5 +242,32 @@ export default {
Promise.all([this.getList(), this.getTable()]).then(() => {
this.noClick = false;
});
}
},
//选择开始时间/结束时间
calendarPriceRangeChange(date) {
this.selectPriceDate = date[0];
},
//根据选择的开始时间/结束时间,动态渲染要禁用的日期
disabledDate(current) {
if (this.selectPriceDate) {
let selectV = moment(
this.selectPriceDate,
"YYYY-MM-DD"
).valueOf();
return (
current >
moment(
new Date(selectV + this.offsetDays),
"YYYY-MM-DD"
) ||
current <
moment(
new Date(selectV - this.offsetDays),
"YYYY-MM-DD"
)
);
} else {
return false;
}
},
}

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-25 13:12:20
* @LastEditTime: 2021-10-25 15:18:01
* @LastEditTime: 2021-10-28 18:48:58
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/ModelInsight/index.vue
@ -14,9 +14,9 @@
<div class="bdl-d1-dd2">
<img class="m1" src="../../assets/images/ModelInsight/img_cxdb.png" @click="goRouter('/brandComparison')" />
<div class="bdl-d1-dd2-d1">
<span class="bdl-d1-dd2-d1-s1">奥迪</span>
<span class="bdl-d1-dd2-d1-s1">{{model}}</span>
</div>
<img class="m2" src="../../assets/images/ModelInsight/img_qhcx.png" @click="openBrand" />
<img class="m2" src="../../assets/images/ModelInsight/img_qhcx.png" @click="openModel" />
</div>
<mlTts></mlTts>
</div>
@ -54,31 +54,34 @@
<v-btn @click="goRouter('/tailInsightDetails')"></v-btn>
</v-label-div>
<div class="bdl-d5-bd">
<mlRearWingPropagationSituation></mlRearWingPropagationSituation>
<mlKeyMedia></mlKeyMedia>
<mlPopularwordCloud></mlPopularwordCloud>
<mlRearWingPropagationSituation></mlRearWingPropagationSituation>
<mlKeyMedia></mlKeyMedia>
<mlPopularwordCloud></mlPopularwordCloud>
</div>
</div>
</div>
<iSwitchModel :brand="brand" :model="model" :visible.sync="modelShow" @change="handlerBrand"></iSwitchModel>
</div>
</template>
<script>
import mlBrandData from "./ml-brand-data";
import mlTts from "./ml-tts"
import mlPopularEvents from "./mlPopularEvents"
import mlPopularEventsList from "./mlPopularEventsList"
import mlTts from "./ml-tts";
import mlPopularEvents from "./mlPopularEvents";
import mlPopularEventsList from "./mlPopularEventsList";
import mlWeiboKol from "./mlWeiboKol";
import mlWeiboPortraits from "./mlWeiboPortraits";
import mlWeiboVolumeTrend from "./mlWeiboVolumeTrend"
import mlForumCommunicationTrend from "./mlForumCommunicationTrend"
import mlForumHotTopicDirection from "./mlForumHotTopicDirection"
import mlSpreadTOPmodels from "./mlSpreadTOPmodels"
import mlKeyMedia from "./mlKeyMedia"
import mlRearWingPropagationSituation from "./mlRearWingPropagationSituation"
import mlPopularwordCloud from "./mlPopularwordCloud"
import mlWeiboVolumeTrend from "./mlWeiboVolumeTrend";
import mlForumCommunicationTrend from "./mlForumCommunicationTrend";
import mlForumHotTopicDirection from "./mlForumHotTopicDirection";
import mlSpreadTOPmodels from "./mlSpreadTOPmodels";
import mlKeyMedia from "./mlKeyMedia";
import mlRearWingPropagationSituation from "./mlRearWingPropagationSituation";
import mlPopularwordCloud from "./mlPopularwordCloud";
import { getUserSeriesName } from "@/api/comm";
export default {
name: "ModelInsight",
inject: ['reload'],
components: {
mlBrandData, //
mlTts, //
@ -92,7 +95,46 @@ export default {
mlSpreadTOPmodels, // TOP
mlKeyMedia,
mlRearWingPropagationSituation,
mlPopularwordCloud
mlPopularwordCloud,
},
data() {
return {
modelShow: false,
brand: "",
model: "",
};
},
created() {
this.brand = this.getBrand.brandname || "奥迪";
this.modelData();
},
methods: {
openModel() {
this.modelShow = true;
},
//
modelData() {
let model = this.getModel.name || "";
if (!model) {
this.getUserSeriesName(this.brand);
} else {
this.model = model;
}
},
//
getUserSeriesName(brandName) {
this.form.token = this.getToken;
this.form.sBrandName = brandName;
getUserSeriesName(this.form).then((res) => {
let data = res.data || [];
this.model = data[0].name;
});
},
handlerBrand(arr) {
this.setBrand(arr[0]);
this.setModel(arr[1]);
this.reload();
},
},
};
</script>

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-25 13:20:36
* @LastEditTime: 2021-10-25 13:42:52
* @LastEditTime: 2021-10-28 19:17:26
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/ModelInsight/ml-brand-data/index.vue
@ -45,8 +45,28 @@
</template>
<script>
// import {getBrandOverviewCount0528} from "@/api/ModelInsight"
export default {
name: "ml-brand-data",
props: ["brand", "model"],
data() {
return {
form: {
sBrand: "",
sSeriesName: "",
token: ""
}
}
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sSeriesName = this.model;
},
methods: {
}
};
</script>

Loading…
Cancel
Save