prod
校文 3 years ago
parent b5d7154bea
commit baaf351529

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

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

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

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

Loading…
Cancel
Save