prod
校文 3 years ago
parent b5d7154bea
commit baaf351529

@ -1,7 +1,7 @@
/*
* @Author: your name
* @Date: 2021-10-20 16:36:08
* @LastEditTime: 2021-11-30 18:56:02
* @LastEditTime: 2021-12-13 18:32:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/api/comm/index.js
@ -155,3 +155,16 @@ export function getBrandName(params) {
}
})
}
// 判断车型、品牌的权限
export function getBrandOrSeriesLevel(params) {
let obj = Object.assign({action: 'getBrandOrSeriesLevel'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 15:56:35
* @LastEditTime: 2021-11-30 18:57:02
* @LastEditTime: 2021-12-13 18:44:17
* @LastEditors: Please set LastEditors
* @Description: 实时事件
* @FilePath: /data-show/src/views/Index/realTimeEvent/index.vue
@ -13,7 +13,7 @@
<div class="rte-tb">
<dv-scroll-board :config="config" :style="{ width: '100%', height: '100%' }" @click="handlerSs" />
</div>
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<p>{{ ModalText }}</p>
</a-modal>
</div>
@ -21,7 +21,7 @@
<script>
import { getEventsListH } from "@/api/home";
import { getUserSeriesName } from "@/api/comm"
import { getUserSeriesName, getBrandOrSeriesLevel } from "@/api/comm";
export default {
name: "real-time-event",
data() {
@ -31,7 +31,7 @@ export default {
config: {},
darr: [],
visible: false,
ModalText: ""
ModalText: "",
};
},
created() {
@ -77,12 +77,12 @@ export default {
this.visible = false;
},
handleOk() {
this.$router.push('/login')
this.$router.push("/login");
},
handlerSs(row) {
if (!this.getToken) {
this.visible = true;
this.ModalText = "您还未登录,是否前往登录"
this.ModalText = "您还未登录,是否前往登录";
return;
}
let ele = this.darr[row.rowIndex];
@ -94,14 +94,19 @@ export default {
query: { events_id: id },
});
}
if(row.columnIndex === 2) {
if (row.columnIndex === 2) {
let brand = ele[2];
this.getUserSeriesName(brand); //
let obj = {brandname: brand};
this.setBrand(obj);
this.setHeaderType(3);
this.$router.push({
path: "/brandInsight"
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); //
let obj = { brandname: brand };
this.setBrand(obj);
this.setHeaderType(3);
this.$router.push({
path: "/brandInsight",
});
});
}
},

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-08 18:58:00
* @LastEditTime: 2021-12-02 10:26:23
* @LastEditTime: 2021-12-13 18:52:34
* @LastEditors: Please set LastEditors
* @Description: 热销排行
* @FilePath: /data-show/src/views/Index/salesRank/index.vue
@ -18,9 +18,9 @@
</div>
</v-label-div>
<div class="sr-bd">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<p>{{ ModalText }}</p>
</a-modal>
</div>
@ -28,8 +28,12 @@
<script>
import createOpt from "./opt";
import {getCheZhuBrandCount0528, getCheZhuTime0528} from "@/api/home"
import {getBrandName,getUserSeriesName} from "@/api/comm"
import { getCheZhuBrandCount0528, getCheZhuTime0528 } from "@/api/home";
import {
getBrandName,
getUserSeriesName,
getBrandOrSeriesLevel,
} from "@/api/comm";
export default {
name: "sales-rank",
data() {
@ -41,98 +45,108 @@ export default {
sQueryType: 1,
sTimeType: 4,
sStartTime: "",
sEndTime: ""
sEndTime: "",
},
selArr: [],
pdata: [],
opt:{},
opt: {},
visible: false,
ModalText: ""
ModalText: "",
};
},
created() {
this.getSelect();
this.getSelect();
},
methods: {
//
//
handlerTabChange(n) {
this.type = n;
this.form.sQueryType = n + 1;
this.getData();
this.type = n;
this.form.sQueryType = n + 1;
this.getData();
},
//
handlerSelect(key) {
let n = this.selArr.findIndex(ele => {
return ele.key === key
})
let obj = this.selArr[n];
this.form.sStartTime = obj.starttime;
this.form.sEndTime = obj.endtime;
this.getData();
let n = this.selArr.findIndex((ele) => {
return ele.key === key;
});
let obj = this.selArr[n];
this.form.sStartTime = obj.starttime;
this.form.sEndTime = obj.endtime;
this.getData();
},
//
getSelect() {
this.load = true;
getCheZhuTime0528().then(res => {
this.selArr = res.data
this.selVal = this.selArr[0].key;
this.form.sStartTime = this.selArr[0].starttime;
this.form.sEndTime = this.selArr[0].endtime;
this.getData();
})
this.load = true;
getCheZhuTime0528().then((res) => {
this.selArr = res.data;
this.selVal = this.selArr[0].key;
this.form.sStartTime = this.selArr[0].starttime;
this.form.sEndTime = this.selArr[0].endtime;
this.getData();
});
},
//
getData() {
this.load = true;
getCheZhuBrandCount0528(this.form).then(res => {
let data = res.data;
this.pdata = data;
this.load = false;
})
this.load = true;
getCheZhuBrandCount0528(this.form).then((res) => {
let data = res.data;
this.pdata = data;
this.load = false;
});
},
//
handlerPage(arr = []) {
let dx = [];
let ds = [];
arr.forEach(ele => {
let key = ele.key;
let value = ele.value;
dx.push(key);
ds.push(value);
})
this.opt = createOpt(dx, ds)
let dx = [];
let ds = [];
arr.forEach((ele) => {
let key = ele.key;
let value = ele.value;
dx.push(key);
ds.push(value);
});
this.opt = createOpt(dx, ds);
},
handleCancel() {
this.visible = false;
},
handleOk() {
this.$router.push('/login')
this.$router.push("/login");
},
clickEchars(data) {
clickEchars(data) {
if (!this.getToken) {
this.visible = true;
this.ModalText = "您还未登录,是否前往登录"
this.ModalText = "您还未登录,是否前往登录";
return;
}
let ele = data[0];
if(this.type === 1) {
let model = ele.axisValueLabel
this.setModel({name: model});
this.setHeaderType(3);
let obj = {
if (this.type === 1) {
let model = ele.axisValueLabel;
getBrandOrSeriesLevel({
token: this.getToken,
sSeriesName: model
}
getBrandName(obj).then((res) => {
this.setBrand({brandname: res.data})
this.$router.push("/modelInsight");
})
sSeriesName: model,
}).then(() => {
this.setModel({ name: model });
this.setHeaderType(3);
let obj = {
token: this.getToken,
sSeriesName: model,
};
getBrandName(obj).then((res) => {
this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight");
});
});
} else {
let brand = ele.axisValueLabel;
this.getUserSeriesName(brand); //
this.setBrand({brandname: brand});
this.setHeaderType(3);
this.$router.push("/brandInsight");
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); //
this.setBrand({ brandname: brand });
this.setHeaderType(3);
this.$router.push("/brandInsight");
});
}
},
//

@ -1,7 +1,7 @@
<!--
* @Author: xw
* @Date: 2021-10-09 10:53:21
* @LastEditTime: 2021-11-30 18:58:54
* @LastEditTime: 2021-12-13 18:57:01
* @LastEditors: Please set LastEditors
* @Description: 传播声量TOP10
* @FilePath: /data-show/src/views/Index/spreadTheSound/index.vue
@ -17,7 +17,7 @@
<div class="st-bd">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<p>{{ ModalText }}</p>
</a-modal>
</div>
@ -26,7 +26,11 @@
<script>
import createOpt from "./opt";
import { getHomeBrandSourceType0528 } from "@/api/home";
import {getBrandName,getUserSeriesName} from "@/api/comm"
import {
getBrandName,
getUserSeriesName,
getBrandOrSeriesLevel,
} from "@/api/comm";
export default {
name: "spread-the-sound",
data() {
@ -39,7 +43,7 @@ export default {
pdata: [],
type: 0,
visible: false,
ModalText: ""
ModalText: "",
};
},
created() {
@ -78,12 +82,12 @@ export default {
this.visible = false;
},
handleOk() {
this.$router.push('/login')
this.$router.push("/login");
},
clickEchars(data) {
if (!this.getToken) {
this.visible = true;
this.ModalText = "您还未登录,是否前往登录"
this.ModalText = "您还未登录,是否前往登录";
return;
}
// if (this.getUser.Brand.indexOf(data[0].axisValueLabel) == -1) {
@ -92,35 +96,32 @@ export default {
// return;
// }
let ele = data[0];
if(this.type === 1) {
let model = ele.axisValueLabel
if (this.type === 1) {
let model = ele.axisValueLabel;
let obj = {
token: this.getToken,
sSeriesName: model
}
getBrandName(obj).then((res) => {
if(this.getUser.Brand.indexOf(res.data) == -1) {
this.visible = true;
this.ModalText = "账号权限不足";
return;
}
this.setModel({name: model});
this.setHeaderType(3);
this.setBrand({brandname: res.data})
this.$router.push("/modelInsight");
})
sSeriesName: model,
};
getBrandOrSeriesLevel(obj).then(() => {
getBrandName(obj).then((res) => {
this.setModel({ name: model });
this.setHeaderType(3);
this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight");
});
});
} else {
let brand = ele.axisValueLabel;
if(this.getUser.Brand.indexOf(brand) == -1) {
this.visible = true;
this.ModalText = "账号权限不足";
return;
}
this.getUserSeriesName(brand); //
this.setBrand({brandname: brand});
this.setHeaderType(3);
this.$router.push("/brandInsight");
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); //
this.setBrand({ brandname: brand });
this.setHeaderType(3);
this.$router.push("/brandInsight");
});
}
},
//

@ -1,113 +1,123 @@
<!--
* @Author: xw
* @Date: 2021-10-09 11:56:50
* @LastEditTime: 2021-12-02 10:24:43
* @LastEditTime: 2021-12-13 19:03:49
* @LastEditors: Please set LastEditors
* @Description: 尾翼洞察
* @FilePath: /data-show/src/views/Index/tailInsight/index.vue
-->
<template>
<div class="tl-outter" v-loading="load">
<vLabel-div title="尾翼洞察">
<div class="tis">
<v-pagination :data="pdata" :style="{marginRight: '0.8rem', marginTop: '0.4rem'}" @change="handlerData"></v-pagination>
<v-tab-group :btns="['品牌', '车型']" @change="handlerChange"></v-tab-group>
</div>
</vLabel-div>
<div class="tl-bd">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<div class="tl-outter" v-loading="load">
<vLabel-div title="尾翼洞察">
<div class="tis">
<v-pagination :data="pdata" :style="{marginRight: '0.8rem', marginTop: '0.4rem'}" @change="handlerData"></v-pagination>
<v-tab-group :btns="['品牌', '车型']" @change="handlerChange"></v-tab-group>
</div>
</vLabel-div>
<div class="tl-bd">
<v-echarts :opt="opt" @getData="clickEchars"></v-echarts>
</div>
<a-modal title="提示" :visible="visible" @ok="handleOk" @cancel="handleCancel">
<p>{{ ModalText }}</p>
</a-modal>
</div>
</div>
</template>
<script>
import createOpt from "./opt"
import {getWeiYiCountHome0528} from "@/api/home"
import {getBrandName,getUserSeriesName} from "@/api/comm"
import createOpt from "./opt";
import { getWeiYiCountHome0528 } from "@/api/home";
import {
getBrandName,
getUserSeriesName,
getBrandOrSeriesLevel,
} from "@/api/comm";
export default {
name: "tail-insight",
data() {
return {
type: 0,
load: false,
form: {
sQueryType: 1
},
opt: {},
pdata: [],
name: "tail-insight",
data() {
return {
type: 0,
load: false,
form: {
sQueryType: 1,
},
opt: {},
pdata: [],
visible: false,
ModalText: ""
}
},
created() {
this.getData()
},
methods: {
//
handlerChange(n) {
this.type = n;
this.form.sQueryType = n+1;
this.getData();
},
//
getData() {
this.load = true;
let obj = Object.assign({}, this.getCommTime, this.form);
getWeiYiCountHome0528(obj).then(res => {
let data = res.data;
this.pdata = data;
this.load = false;
})
},
//
handlerData(arr) {
let dy = [];
let ds = [];
arr.forEach(ele => {
let key = ele.key;
let value = ele.value;
dy.push(key);
ds.push(value)
});
this.opt = createOpt(dy,ds);
ModalText: "",
};
},
created() {
this.getData();
},
methods: {
//
handlerChange(n) {
this.type = n;
this.form.sQueryType = n + 1;
this.getData();
},
//
getData() {
this.load = true;
let obj = Object.assign({}, this.getCommTime, this.form);
getWeiYiCountHome0528(obj).then((res) => {
let data = res.data;
this.pdata = data;
this.load = false;
});
},
handleCancel() {
//
handlerData(arr) {
let dy = [];
let ds = [];
arr.forEach((ele) => {
let key = ele.key;
let value = ele.value;
dy.push(key);
ds.push(value);
});
this.opt = createOpt(dy, ds);
},
handleCancel() {
this.visible = false;
},
handleOk() {
this.$router.push('/login')
handleOk() {
this.$router.push("/login");
},
clickEchars(data) {
clickEchars(data) {
if (!this.getToken) {
this.visible = true;
this.ModalText = "您还未登录,是否前往登录"
this.ModalText = "您还未登录,是否前往登录";
return;
}
let ele = data[0];
if(this.type === 1) {
let model = ele.axisValueLabel
this.setModel({name: model});
this.setHeaderType(3);
if (this.type === 1) {
let model = ele.axisValueLabel;
let obj = {
token: this.getToken,
sSeriesName: model
}
getBrandName(obj).then((res) => {
this.setBrand({brandname: res.data})
this.$router.push("/modelInsight");
})
sSeriesName: model,
};
getBrandOrSeriesLevel(obj).then(() => {
this.setModel({ name: model });
this.setHeaderType(3);
getBrandName(obj).then((res) => {
this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight");
});
});
} else {
let brand = ele.axisValueLabel;
this.getUserSeriesName(brand);
this.setBrand({brandname: brand});
this.setHeaderType(3);
this.$router.push("/brandInsight");
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand);
this.setBrand({ brandname: brand });
this.setHeaderType(3);
this.$router.push("/brandInsight");
});
}
},
//
@ -121,25 +131,25 @@ export default {
this.setModel(this.chooseModel);
});
},
}
},
};
</script>
<style lang="less" scoped>
.tl-outter {
position: relative;
width: 460px;
height: 312px;
border: 2px solid #0f2a4d;
margin-top: 16px;
margin-left: 16px;
display: flex;
flex-direction: column;
.tl-bd {
position: relative;
width: 100%;
height: calc(100% - 48px);
}
position: relative;
width: 460px;
height: 312px;
border: 2px solid #0f2a4d;
margin-top: 16px;
margin-left: 16px;
display: flex;
flex-direction: column;
.tl-bd {
position: relative;
width: 100%;
height: calc(100% - 48px);
}
}
.tis {
display: flex;

Loading…
Cancel
Save