张雄 3 years ago
parent 5be3a12b90
commit 835d497be4

@ -142,9 +142,9 @@ export default {
handlerChoose(row) { handlerChoose(row) {
this.showActive = row.brandid; this.showActive = row.brandid;
this.chooseBrand = row; this.chooseBrand = row;
console.log(this.chooseBrand) //console.log(this.chooseBrand)
this.brandname = this.chooseBrand.brandname; this.brandname = this.chooseBrand.brandname;
this.getUserSeriesName(this.brandname); // this.getUserSeriesName(this.brandname);
}, },
// //
getUserSeriesName(brandName) { getUserSeriesName(brandName) {
@ -160,6 +160,7 @@ export default {
// //
handlerSubmit() { handlerSubmit() {
if (this.chooseBrand) { if (this.chooseBrand) {
this.getUserSeriesName(this.brandname);
this.$emit("change", [this.chooseBrand, this.chooseModel]); this.$emit("change", [this.chooseBrand, this.chooseModel]);
this.handlerClose(); this.handlerClose();
} else { } else {

@ -39,18 +39,20 @@ export default {
chooseChange(arr) { chooseChange(arr) {
this.$refs.ect.list = arr; this.$refs.ect.list = arr;
this.subList = arr; this.subList = arr;
this.setEComparison(this.subList);
}, },
// //
handlerDel(arr) { handlerDel(arr) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.erdl.chooseList = arr; this.$refs.erdl.chooseList = arr;
this.subList = arr; this.subList = arr;
this.setEComparison(this.subList);
}) })
}, },
// //
handlerBegin() { handlerBegin() {
if(this.subList.length < 2) { if(this.subList.length < 2 || (this.getEComparison[0].events_id == "" || this.getEComparison[1].events_id == "")) {
this.$message.warning('至少2个事件进行对比'); this.$message.warning('至少2个事件进行对比');
return return
} }

@ -1,7 +1,7 @@
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2021-10-15 09:16:31 * @Date: 2021-10-15 09:16:31
* @LastEditTime: 2021-12-07 19:10:42 * @LastEditTime: 2021-11-21 14:58:52
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue * @FilePath: /data-show/src/lycomponents/iSwitchBrand/index.vue
@ -84,7 +84,7 @@ export default {
}) })
this.chooseBrand = row; this.chooseBrand = row;
}); });
//this.getUserSeriesName(this.brandname); this.getUserSeriesName(this.brandname);
}, },
data() { data() {
return { return {
@ -149,7 +149,7 @@ export default {
newArr = [], newArr = [],
length = arr.length; length = arr.length;
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
if (arr[i] === id) { if (arr[i] === id) {
newArr[0] = arr[i]; newArr[0] = arr[i];
} else { } else {
newArr[index++] = arr[i]; newArr[index++] = arr[i];
@ -162,8 +162,7 @@ export default {
this.showActive = row.brandid; this.showActive = row.brandid;
this.chooseBrand = row; this.chooseBrand = row;
this.brandname = this.chooseBrand.brandname; this.brandname = this.chooseBrand.brandname;
this.getUserSeriesName(this.brandname); this.getUserSeriesName(this.brandname)
this.chooseModel = null; //
}, },
// //
handlerModel(n, row) { handlerModel(n, row) {

@ -37,7 +37,11 @@ export default {
}, },
methods: { methods: {
goPath() { goPath() {
this.$router.push({path: '/eventComparison'}) if(this.getEComparison[0].events_id == "" || this.getEComparison[1].events_id == "") {
this.$router.push({path: '/iSwitchEvent'})
} else {
this.$router.push({path: '/eventComparison'})
}
}, },
// //
getData() { getData() {

@ -29,7 +29,7 @@
<script> <script>
import createOpt from "./opt"; import createOpt from "./opt";
import {getCheZhuBrandCount0528, getCheZhuTime0528} from "@/api/home" import {getCheZhuBrandCount0528, getCheZhuTime0528} from "@/api/home"
import {getBrandName} from "@/api/comm" import {getBrandName,getUserSeriesName} from "@/api/comm"
export default { export default {
name: "sales-rank", name: "sales-rank",
data() { data() {
@ -129,11 +129,23 @@ export default {
}) })
} else { } else {
let brand = ele.axisValueLabel; let brand = ele.axisValueLabel;
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");
} }
} },
//
getUserSeriesName(brandName) {
this.form.token = this.getToken;
this.form.sBrandName = brandName;
getUserSeriesName(this.form).then((res) => {
let data = res.data || [];
this.models = data;
this.chooseModel = this.models[0];
this.setModel(this.chooseModel);
});
},
}, },
}; };
</script> </script>

@ -26,7 +26,7 @@
<script> <script>
import createOpt from "./opt"; import createOpt from "./opt";
import { getHomeBrandSourceType0528 } from "@/api/home"; import { getHomeBrandSourceType0528 } from "@/api/home";
import {getBrandName} from "@/api/comm" import {getBrandName,getUserSeriesName} from "@/api/comm"
export default { export default {
name: "spread-the-sound", name: "spread-the-sound",
data() { data() {
@ -99,14 +99,25 @@ export default {
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;
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");
} }
} },
//
getUserSeriesName(brandName) {
this.form.token = this.getToken;
this.form.sBrandName = brandName;
getUserSeriesName(this.form).then((res) => {
let data = res.data || [];
this.models = data;
this.chooseModel = this.models[0];
this.setModel(this.chooseModel);
});
},
}, },
}; };
</script> </script>

@ -27,7 +27,7 @@
<script> <script>
import createOpt from "./opt" import createOpt from "./opt"
import {getWeiYiCountHome0528} from "@/api/home" import {getWeiYiCountHome0528} from "@/api/home"
import {getBrandName} from "@/api/comm" import {getBrandName,getUserSeriesName} from "@/api/comm"
export default { export default {
name: "tail-insight", name: "tail-insight",
data() { data() {
@ -104,11 +104,23 @@ export default {
}) })
} else { } else {
let brand = ele.axisValueLabel; let brand = ele.axisValueLabel;
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");
} }
} },
//
getUserSeriesName(brandName) {
this.form.token = this.getToken;
this.form.sBrandName = brandName;
getUserSeriesName(this.form).then((res) => {
let data = res.data || [];
this.models = data;
this.chooseModel = this.models[0];
this.setModel(this.chooseModel);
});
},
} }
}; };
</script> </script>

@ -34,7 +34,7 @@
</a-form> --> </a-form> -->
<div class="rwl-tb"> <div class="rwl-tb">
<v-table :columns="columns" :loading="tableLoading" :data="tdata" :pagination="pagination" @change="handlerPage"> <v-table :columns="columns" :loading="tableLoading" :data="tdata" :pagination="pagination" @change="handlerPage">
<template slot="srctitle" slot-scope="text, record"> <template slot="titles" slot-scope="text, record">
<a :href="record.url" style="color: #fff" target="_blank">{{ text|doStr(100) }}</a> <a :href="record.url" style="color: #fff" target="_blank">{{ text|doStr(100) }}</a>
<a-tag color="#108ee9" v-if="record.affections === 1" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag> <a-tag color="#108ee9" v-if="record.affections === 1" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag>
<a-tag color="#fece42" v-if="record.affections === 3" style="margin-left: 0.6rem;margin-right: 0px"></a-tag> <a-tag color="#fece42" v-if="record.affections === 3" style="margin-left: 0.6rem;margin-right: 0px"></a-tag>
@ -71,9 +71,9 @@ export default {
columns: [ columns: [
{ {
title: "新闻标题", title: "新闻标题",
key: "srctitle", key: "title",
dataIndex: "srctitle", dataIndex: "title",
scopedSlots: { customRender: "srctitle" }, scopedSlots: { customRender: "titles" },
}, },
{ {
title: "来源", title: "来源",

@ -34,7 +34,7 @@
</a-form> </a-form>
<div class="rwl-tb"> <div class="rwl-tb">
<v-table :columns="columns" :loading="tableLoading" :data="tdata" :pagination="pagination" @change="handlerPage"> <v-table :columns="columns" :loading="tableLoading" :data="tdata" :pagination="pagination" @change="handlerPage">
<template slot="srctitle" slot-scope="text, record"> <template slot="titles" slot-scope="text, record">
<a :href="record.url" style="color: #fff" target="_blank">{{ text|doStr(100) }}</a> <a :href="record.url" style="color: #fff" target="_blank">{{ text|doStr(100) }}</a>
<a-tag color="#108ee9" v-if="record.affections === 1" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag> <a-tag color="#108ee9" v-if="record.affections === 1" style="margin-left: 0.6rem;margin-right: 0px;"></a-tag>
<a-tag color="#fece42" v-if="record.affections === 3" style="margin-left: 0.6rem;margin-right: 0px"></a-tag> <a-tag color="#fece42" v-if="record.affections === 3" style="margin-left: 0.6rem;margin-right: 0px"></a-tag>
@ -73,9 +73,9 @@ export default {
columns: [ columns: [
{ {
title: "新闻标题", title: "新闻标题",
key: "srctitle", key: "title",
dataIndex: "srctitle", dataIndex: "title",
scopedSlots: { customRender: "srctitle" }, scopedSlots: { customRender: "titles" },
}, },
{ {
title: "来源", title: "来源",

Loading…
Cancel
Save