prod
lily.zhang 3 years ago
parent 7f53b185cd
commit fbfcc4abb7

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-20 16:36:08
* @LastEditTime: 2021-10-22 13:08:08
* @LastEditTime: 2021-10-27 09:01:56
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/api/comm/index.js
@ -55,3 +55,13 @@ export function getCrisis(params) {
params: obj
})
}
// 获取切换品牌
export function getUserBrand(params) {
let obj = Object.assign({action: 'getUserBrand'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'get',
params: obj
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

@ -78,7 +78,6 @@ export default {
};
},
created() {
console.log(this.getCommTime)
this.getTime(this.getCommTime)
},
mounted() {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-15 09:16:31
* @LastEditTime: 2021-10-18 13:27:20
* @LastEditTime: 2021-10-27 11:31:33
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue
@ -18,33 +18,56 @@
<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-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="d1">
<img class="m1" :src="item.img">
</div>
<span class="s1">{{item.brandname}}</span>
</div>
</div>
</vue-scroll>
</div>
</div>
<div class="sb-footer" align="center">
<img class="m1" src="../../assets/images/BrandInsight/btn-01.png" @click="handlerSubmit">
</div>
<div class="sb-footer"></div>
</div>
</div>
</template>
<script>
import { getUserBrand } from "@/api/comm";
export default {
name: "iSwitchBrand",
props: {
visible: {
type: Boolean,
default: false
}
default: false,
},
},
watch: {
visible: {
handler(val) {
this.show = val ? true : false;
this.show = val ? true : false;
},
immediate: true
}
immediate: true,
},
},
created() {
this.getBrands().then(() => {
this.handlerLi(0);
});
},
data() {
return {
show: false,
activeLi: 0,
form: {
token: "",
},
letterArr: [
"热门",
"A",
@ -73,16 +96,50 @@ export default {
"Y",
"Z",
],
cars: [],
showCars: [],
showActive: "",
chooseBrand: {},
};
},
methods: {
//
handlerClose() {
this.show = false;
this.$emit("update:visible", this.show);
},
// li
handlerLi(n) {
this.activeLi = 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 = Object.assign(
this.chooseBrand,
this.showCars[n]
);
},
//
handlerSubmit() {
this.$emit("change", this.chooseBrand);
this.handlerClose();
},
},
};
</script>
@ -99,7 +156,7 @@ export default {
overflow: auto;
.sb-inner {
position: absolute;
width: 1200px;
width: 1230px;
height: 720px;
top: 0px;
left: 50%;
@ -111,7 +168,7 @@ export default {
.sb-d {
width: 100%;
height: calc(100% - 128px);
overflow: auto;
overflow: hidden;
}
.sb-ul {
margin: 0px;
@ -119,6 +176,8 @@ export default {
list-style: none;
margin-left: 16px;
margin-top: 10px;
height: 30px;
.liSn {
float: left;
color: #fff;
@ -136,9 +195,50 @@ export default {
}
}
.lactive {
color: #3373cc;
color: #3373cc;
}
}
.sb-dd {
width: 100%;
height: calc(100% - 30px);
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-footer {
position: absolute;
@ -147,6 +247,11 @@ export default {
bottom: 0px;
left: 0px;
border-top: 1px solid #1e3d64;
.m1 {
width: 480px;
height: 100%;
cursor: pointer;
}
}
}
}

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-18 09:55:16
* @LastEditTime: 2021-10-18 16:26:26
* @LastEditTime: 2021-10-27 09:08:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/EventComparison/index.vue
@ -34,7 +34,6 @@ export default {
watch: {
visible: {
handler(val) {
console.log(val)
this.show = val ? true : false;
},
immediate: true

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:56:13
* @LastEditTime: 2021-10-26 10:09:33
* @LastEditTime: 2021-10-27 10:36:14
* @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'])
...mapGetters(['getZoom','getToken', 'getUser', 'getAccount', 'getCommTime', 'getCtime', 'getHeaderType', 'getBrand'])
},
methods: {
...mapActions(["setZoom", 'setToken', 'setUser', 'setAccount', 'setCommTime','setCtime', 'setHeaderType'])
...mapActions(["setZoom", 'setToken', 'setUser', 'setAccount', 'setCommTime','setCtime', 'setHeaderType', 'setBrand'])
}
})
}

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:36:49
* @LastEditTime: 2021-10-26 10:01:24
* @LastEditTime: 2021-10-27 10:28:48
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/actions.js
@ -28,5 +28,8 @@ const actions = {
setHeaderType: ({commit}, log) => {
commit('setHeaderType', log)
},
setBrand: ({commit}, log) => {
commit('setBrand', log)
}
}
export default actions

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:37:06
* @LastEditTime: 2021-10-26 10:04:20
* @LastEditTime: 2021-10-27 10:33:07
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/getters.js
@ -27,6 +27,9 @@ const getters = {
},
getHeaderType(state) {
return state.headerType
},
getBrand(state) {
return state.brand
}
}
export default getters

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

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 13:37:50
* @LastEditTime: 2021-10-26 10:03:54
* @LastEditTime: 2021-10-27 10:32:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/store/state.js
@ -19,5 +19,6 @@ const state = {
commTime: JSON.parse(sessionStorage.getItem('commTime')) || commTime,
ctime: JSON.parse(sessionStorage.getItem('ctime')) || {},
headerType: sessionStorage.getItem('headerType') || 1,
brand: JSON.parse(sessionStorage.getItem('brand')) || {}
}
export default state;

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-11 18:42:58
* @LastEditTime: 2021-10-26 16:09:53
* @LastEditTime: 2021-10-27 10:48:07
* @LastEditors: Please set LastEditors
* @Description: 品牌数据
* @FilePath: /data-show/src/views/BrandInsight/brandData/index.vue
@ -64,7 +64,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.load = true;
Promise.all([this.getBrandOverviewCount0528(), this.getAffections()]).then(() => {
this.load = false;

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-12 09:03:51
* @LastEditTime: 2021-10-26 16:10:27
* @LastEditTime: 2021-10-27 10:49:45
* @LastEditors: Please set LastEditors
* @Description: 品牌TOP车型
* @FilePath: /data-show/src/views/BrandInsight/brandTop/index.vue
@ -33,7 +33,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData()
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 16:33:38
* @LastEditTime: 2021-10-26 14:14:26
* @LastEditTime: 2021-10-27 10:51:37
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/forumCommunicationTrend/index.vue
@ -32,7 +32,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 16:48:36
* @LastEditTime: 2021-10-26 16:30:34
* @LastEditTime: 2021-10-27 10:51:52
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/forumHotTopicDirection/index.vue
@ -41,7 +41,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-11 17:59:49
* @LastEditTime: 2021-10-26 15:21:58
* @LastEditTime: 2021-10-27 10:55:53
* @LastEditors: Please set LastEditors
* @Description: 品牌洞察
* @FilePath: /data-show/src/views/BrandInsight/index.vue
@ -17,7 +17,7 @@
<div class="bdl-d1-dd2">
<img class="m1" src="../../assets/images/BrandInsight/img_ppdb.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">{{this.brand}}</span>
</div>
<img class="m2" src="../../assets/images/BrandInsight/img_qhpp.png" @click="openBrand"/>
</div>
@ -65,7 +65,7 @@
</div>
</div>
</div>
<iSwitchBrand :visible.sync="brandShow"></iSwitchBrand>
<iSwitchBrand :visible.sync="brandShow" @change="handlerBrand"></iSwitchBrand>
</div>
</template>
@ -86,6 +86,7 @@ import keyMedia from "./keyMedia";
import popularwordCloud from "./popularwordCloud";
export default {
name: "BrandInsight",
inject: ['reload'],
components: {
brandData, //
brandTop, // top
@ -109,14 +110,21 @@ export default {
}
},
created() {
this.brand = this.getBrand.brandname || '奥迪';
},
methods: {
//
goRouter(path, query = {}) {
this.$router.push({path: path, query: query});
},
//
openBrand() {
this.brandShow = true;
},
//
handlerBrand(row) {
this.setBrand(row);
this.reload();
}
}
};

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 18:43:22
* @LastEditTime: 2021-10-26 15:58:29
* @LastEditTime: 2021-10-27 10:52:13
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/keyMedia/index.vue
@ -35,7 +35,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-12 11:06:58
* @LastEditTime: 2021-10-26 17:55:46
* @LastEditTime: 2021-10-27 10:52:22
* @LastEditors: Please set LastEditors
* @Description: 热门事件
* @FilePath: /data-show/src/views/BrandInsight/popularEvents/index.vue
@ -33,7 +33,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-12 11:16:44
* @LastEditTime: 2021-10-26 17:48:58
* @LastEditTime: 2021-10-27 09:06:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/popularEvents/opt.js
@ -32,11 +32,10 @@ function createData(obj = {}) {
}
export default function createOpt(ds = {}) {
const data = createData(ds)
console.log(data)
return {
title: {
show: false,
text: '湘西自治州不同规模企业对岗位工作经验要求情况'
text: '12345'
},
legend: {
y: 'top',

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-12 10:50:44
* @LastEditTime: 2021-10-26 19:00:26
* @LastEditTime: 2021-10-27 10:52:35
* @LastEditors: Please set LastEditors
* @Description: 热门事件列表
* @FilePath: /data-show/src/views/BrandInsight/popularEventsList/index.vue
@ -42,7 +42,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 19:16:46
* @LastEditTime: 2021-10-26 16:13:45
* @LastEditTime: 2021-10-27 10:52:45
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/popularwordCloud/index.vue
@ -33,7 +33,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 18:35:53
* @LastEditTime: 2021-10-26 16:12:51
* @LastEditTime: 2021-10-27 10:52:53
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/rearWingPropagationSituation/index.vue
@ -33,7 +33,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 18:18:20
* @LastEditTime: 2021-10-26 16:14:50
* @LastEditTime: 2021-10-27 10:53:04
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/spreadTOPmodels/index.vue
@ -33,7 +33,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData()
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-12 09:32:35
* @LastEditTime: 2021-10-26 16:11:28
* @LastEditTime: 2021-10-27 10:53:12
* @LastEditors: Please set LastEditors
* @Description: 舆情传播趋势
* @FilePath: /data-show/src/views/BrandInsight/titsopo/index.vue
@ -39,7 +39,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData()
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 14:19:53
* @LastEditTime: 2021-10-26 16:15:48
* @LastEditTime: 2021-10-27 10:53:25
* @LastEditors: Please set LastEditors
* @Description: 微博KOL
* @FilePath: /data-show/src/views/BrandInsight/weiboKol/index.vue
@ -67,7 +67,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 15:06:47
* @LastEditTime: 2021-10-26 18:55:53
* @LastEditTime: 2021-10-27 10:53:36
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/weiboPortraits/index.vue
@ -69,7 +69,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {
@ -97,7 +97,6 @@ export default {
this.opt = createOpt(this.attestation, this.colors);
} else {
this.labelData = this.region;
console.log(this.labelData)
let total = 0;
this.region.forEach((ele) => {
total += ele.value * 1;

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-10-12 15:24:48
* @LastEditTime: 2021-10-26 16:16:59
* @LastEditTime: 2021-10-27 10:53:45
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/BrandInsight/weiboVolumeTrend/index.vue
@ -34,7 +34,7 @@ export default {
},
created() {
this.form.token = this.getToken;
this.form.sBrand = this.brand;
this.form.sBrand = this.getBrand.brandname || this.brand;
this.getData();
},
methods: {

Loading…
Cancel
Save