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
@ -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];
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); //
let obj = {brandname: brand};
let obj = { brandname: brand };
this.setBrand(obj);
this.setHeaderType(3);
this.$router.push({
path: "/brandInsight"
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
@ -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,13 +45,13 @@ export default {
sQueryType: 1,
sTimeType: 4,
sStartTime: "",
sEndTime: ""
sEndTime: "",
},
selArr: [],
pdata: [],
opt:{},
opt: {},
visible: false,
ModalText: ""
ModalText: "",
};
},
created() {
@ -62,9 +66,9 @@ export default {
},
//
handlerSelect(key) {
let n = this.selArr.findIndex(ele => {
return ele.key === 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;
@ -73,66 +77,76 @@ export default {
//
getSelect() {
this.load = true;
getCheZhuTime0528().then(res => {
this.selArr = res.data
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 => {
getCheZhuBrandCount0528(this.form).then((res) => {
let data = res.data;
this.pdata = data;
this.load = false;
})
});
},
//
handlerPage(arr = []) {
let dx = [];
let ds = [];
arr.forEach(ele => {
arr.forEach((ele) => {
let key = ele.key;
let value = ele.value;
dx.push(key);
ds.push(value);
})
this.opt = createOpt(dx, ds)
});
this.opt = createOpt(dx, ds);
},
handleCancel() {
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;
}
let ele = data[0];
if(this.type === 1) {
let model = ele.axisValueLabel
this.setModel({name: model});
if (this.type === 1) {
let model = ele.axisValueLabel;
getBrandOrSeriesLevel({
token: this.getToken,
sSeriesName: model,
}).then(() => {
this.setModel({ name: model });
this.setHeaderType(3);
let obj = {
token: this.getToken,
sSeriesName: model
}
sSeriesName: model,
};
getBrandName(obj).then((res) => {
this.setBrand({brandname: res.data})
this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight");
})
});
});
} else {
let brand = ele.axisValueLabel;
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); //
this.setBrand({brandname: 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
@ -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
}
sSeriesName: model,
};
getBrandOrSeriesLevel(obj).then(() => {
getBrandName(obj).then((res) => {
if(this.getUser.Brand.indexOf(res.data) == -1) {
this.visible = true;
this.ModalText = "账号权限不足";
return;
}
this.setModel({name: model});
this.setModel({ name: model });
this.setHeaderType(3);
this.setBrand({brandname: res.data})
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;
}
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand); //
this.setBrand({brandname: brand});
this.setBrand({ brandname: brand });
this.setHeaderType(3);
this.$router.push("/brandInsight");
});
}
},
//

@ -1,7 +1,7 @@
<!--
* @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
@ -25,9 +25,13 @@
</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() {
@ -35,79 +39,85 @@ export default {
type: 0,
load: false,
form: {
sQueryType: 1
sQueryType: 1,
},
opt: {},
pdata: [],
visible: false,
ModalText: ""
}
ModalText: "",
};
},
created() {
this.getData()
this.getData();
},
methods: {
//
handlerChange(n) {
this.type = n;
this.form.sQueryType = n+1;
this.form.sQueryType = n + 1;
this.getData();
},
//
getData() {
this.load = true;
let obj = Object.assign({}, this.getCommTime, this.form);
getWeiYiCountHome0528(obj).then(res => {
getWeiYiCountHome0528(obj).then((res) => {
let data = res.data;
this.pdata = data;
this.load = false;
})
});
},
//
handlerData(arr) {
let dy = [];
let ds = [];
arr.forEach(ele => {
arr.forEach((ele) => {
let key = ele.key;
let value = ele.value;
dy.push(key);
ds.push(value)
ds.push(value);
});
this.opt = createOpt(dy,ds);
this.opt = createOpt(dy, ds);
},
handleCancel() {
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;
}
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
}
sSeriesName: model,
};
getBrandOrSeriesLevel(obj).then(() => {
this.setModel({ name: model });
this.setHeaderType(3);
getBrandName(obj).then((res) => {
this.setBrand({brandname: res.data})
this.setBrand({ brandname: res.data });
this.$router.push("/modelInsight");
})
});
});
} else {
let brand = ele.axisValueLabel;
getBrandOrSeriesLevel({
token: this.getToken,
sBrand: brand,
}).then(() => {
this.getUserSeriesName(brand);
this.setBrand({brandname: brand});
this.setBrand({ brandname: brand });
this.setHeaderType(3);
this.$router.push("/brandInsight");
});
}
},
//
@ -121,7 +131,7 @@ export default {
this.setModel(this.chooseModel);
});
},
}
},
};
</script>

Loading…
Cancel
Save