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
@ -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];
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); // this.getUserSeriesName(brand); //
let obj = {brandname: brand}; let obj = { brandname: brand };
this.setBrand(obj); this.setBrand(obj);
this.setHeaderType(3); this.setHeaderType(3);
this.$router.push({ this.$router.push({
path: "/brandInsight" 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
@ -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,13 +45,13 @@ 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() {
@ -62,9 +66,9 @@ export default {
}, },
// //
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;
@ -73,66 +77,76 @@ export default {
// //
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({
token: this.getToken,
sSeriesName: model,
}).then(() => {
this.setModel({ name: model });
this.setHeaderType(3); this.setHeaderType(3);
let obj = { let obj = {
token: this.getToken, token: this.getToken,
sSeriesName: model sSeriesName: model,
} };
getBrandName(obj).then((res) => { getBrandName(obj).then((res) => {
this.setBrand({brandname: res.data}) this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight"); this.$router.push("/modelInsight");
}) });
});
} else { } else {
let brand = ele.axisValueLabel; let brand = ele.axisValueLabel;
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).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,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
@ -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,
} };
getBrandOrSeriesLevel(obj).then(() => {
getBrandName(obj).then((res) => { getBrandName(obj).then((res) => {
if(this.getUser.Brand.indexOf(res.data) == -1) { this.setModel({ name: model });
this.visible = true;
this.ModalText = "账号权限不足";
return;
}
this.setModel({name: model});
this.setHeaderType(3); this.setHeaderType(3);
this.setBrand({brandname: res.data}) this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight"); 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,7 +1,7 @@
<!-- <!--
* @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
@ -25,9 +25,13 @@
</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() {
@ -35,79 +39,85 @@ export default {
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) { handlerData(arr) {
let dy = []; let dy = [];
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;
dy.push(key); dy.push(key);
ds.push(value) ds.push(value);
}); });
this.opt = createOpt(dy,ds); this.opt = createOpt(dy, 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});
this.setHeaderType(3);
let obj = { let obj = {
token: this.getToken, token: this.getToken,
sSeriesName: model sSeriesName: model,
} };
getBrandOrSeriesLevel(obj).then(() => {
this.setModel({ name: model });
this.setHeaderType(3);
getBrandName(obj).then((res) => { getBrandName(obj).then((res) => {
this.setBrand({brandname: res.data}) this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight"); this.$router.push("/modelInsight");
}) });
});
} else { } else {
let brand = ele.axisValueLabel; let brand = ele.axisValueLabel;
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).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");
});
} }
}, },
// //
@ -121,7 +131,7 @@ export default {
this.setModel(this.chooseModel); this.setModel(this.chooseModel);
}); });
}, },
} },
}; };
</script> </script>

Loading…
Cancel
Save