张雄 3 years ago
parent a38be158c6
commit bd3a890bbe

@ -231,7 +231,7 @@ export function getSourceTopWY(params) {
} }
// 专项分析 - 尾翼调性占比 // 专项分析 - 尾翼调性占比
export function getAffectionsTimeWY(params) { export function getAffectionsTimeWY(params) {
let obj = Object.assign({action: 'getAffectionsTime', sType: 'BrandWeiYi'}, params) let obj = Object.assign({action: 'getAffections', sType: 'BrandWeiYi'}, params)
return httpService({ return httpService({
url: `/api/v6.ashx`, url: `/api/v6.ashx`,
method: 'post', method: 'post',

@ -231,4 +231,17 @@ export function getBrandType(params) {
} }
}) })
} }
// 车型筛选(精细)
export function getSeriesNameByCategory(params) {
let obj = Object.assign({action: 'getSeriesNameByCategory'}, params)
return httpService({
url: `/api/v6.ashx`,
method: 'post',
data: obj,
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
})
}
///////// /////////

@ -16,6 +16,7 @@
<ul class="sb-ul"> <ul class="sb-ul">
<span class="liSn">按品牌拼音首字母查找:</span> <span class="liSn">按品牌拼音首字母查找:</span>
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li> <li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
<li @click="selectAll"></li>
</ul> </ul>
<div style="clear: both"></div> <div style="clear: both"></div>
<div class="sb-dd"> <div class="sb-dd">
@ -153,6 +154,13 @@ export default {
handlerSubmit() { handlerSubmit() {
this.$emit("change", this.list); this.$emit("change", this.list);
}, },
selectAll() {
let arr = [];
this.showCars.forEach(ele => {
arr.push(ele.brandname);
})
this.$emit("selectAll", arr);
}
}, },
}; };
</script> </script>

@ -16,8 +16,55 @@
<ul class="sb-ul"> <ul class="sb-ul">
<span class="liSn">按品牌拼音首字母查找:</span> <span class="liSn">按品牌拼音首字母查找:</span>
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li> <li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
<li @click="selectAll"></li>
</ul> </ul>
<div style="clear: both"></div> <div class="sb-tabs">
<a-form-model layout="inline" style="margin-left: 16px">
<a-form-model-item label="数据筛选">
<a-select style="width: 154px" mode="multiple" v-model="countries" placeholder="选择国别" allowClear>
<a-select-option v-for="(item) in countryList" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
<a-select-opt-group v-for="(it,id) in countryList" :key="id*10" :label="it.value">
<a-select-option v-for="(item) in it.data" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
</a-select-opt-group>
</a-select>
<a-select style="margin-left: 8px;width: 154px" mode="multiple" v-model="energies" placeholder="选择能源" allowClear>
<a-select-option v-for="(item) in energyList" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
</a-select>
<a-select style="margin-left: 8px;width: 154px" mode="multiple" v-model="prices" placeholder="选择价格" allowClear>
<a-select-option v-for="(item) in priceList" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
</a-select>
<a-select style="margin-left: 8px;width: 154px" mode="multiple" v-model="specs" placeholder="选择级别" allowClear>
<a-select-option v-for="(item) in specList" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
<a-select-opt-group v-for="(it,id) in specList" :key="id*10" :label="it.value">
<a-select-option v-for="(item) in it.data" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
</a-select-opt-group>
</a-select>
<a-select style="margin-left: 8px;width: 154px" mode="multiple" v-model="displacements" placeholder="选择排量" allowClear>
<a-select-option v-for="(item) in displacementList" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
</a-select>
<a-select style="margin-left: 8px;width: 154px" mode="multiple" v-model="seats" placeholder="选择座位数" allowClear>
<a-select-option v-for="(item) in seatList" :value="item.key" :key="item.value">
{{item.value}}
</a-select-option>
</a-select>
<a-button type="primary" style="margin-left: 16px" @click="onSearch"></a-button>
</a-form-model-item>
</a-form-model>
</div>
<div class="sb-body"> <div class="sb-body">
<div class="sb-dd"> <div class="sb-dd">
<vue-scroll> <vue-scroll>
@ -31,13 +78,12 @@
</div> </div>
</vue-scroll> </vue-scroll>
</div> </div>
<div class="sb-dd-right"> <div class="sb-dd-right">
<vue-scroll> <vue-scroll>
<div class="sb-bd" v-loading="load"> <div class="sb-bd" v-loading="load">
<div class="sb-b-item" :class="list.indexOf(item.name) != -1 ? 'sb-b-item-active': ''" v-for="(item,index) in models" :key="index" @click="handlerModel(index, item)"> <div class="sb-b-item" :class="list.indexOf(item.seriesname) != -1 ? 'sb-b-item-active': ''" v-for="(item,index) in models" :key="index" @click="handlerModel(index, item)">
<div v-if="item.name.length > 12" style="font-size: 15px">{{item.name}}</div> <div v-if="item.seriesname.length > 12" style="font-size: 15px">{{item.seriesname}}</div>
<div v-else>{{item.name}}</div> <div v-else>{{item.seriesname}}</div>
</div> </div>
</div> </div>
</vue-scroll> </vue-scroll>
@ -52,7 +98,8 @@
</template> </template>
<script> <script>
import { getUserBrand, getUserSeriesName } from "@/api/comm"; import {getCountryS,getPriceRangeS,getSpecName1,getSeatS,getDisplacementS,getEnergyS} from "@/api/SaleRankMarketCommon";
import { getUserBrand, getSeriesNameByCategory } from "@/api/comm";
export default { export default {
name: "iSwitchModel", name: "iSwitchModel",
props: { props: {
@ -84,6 +131,8 @@ export default {
}, },
}, },
created() { created() {
this.searchForm.token = this.getToken;
this.getApi();
this.brandname = this.brand; this.brandname = this.brand;
this.modelName = this.model; this.modelName = this.model;
this.getBrands().then(() => { this.getBrands().then(() => {
@ -104,6 +153,18 @@ export default {
token: "", token: "",
sBrandName: "" sBrandName: ""
}, },
searchForm: {
token: '',
sBrand: '',
sType: 'Series',
sFirstword: '',
sSpec: '',
sPriceRangeS: '',
sDisplacementS: '',
sSeatS: '',
sEnergyType: '',
sCountryS: '',
},
letterArr: [ letterArr: [
], ],
@ -114,10 +175,44 @@ export default {
chooseBrand: null, chooseBrand: null,
chooseModel: null, chooseModel: null,
modelName: "", modelName: "",
brandname: "" brandname: "",
//
countryList: [],
energyList: [],
priceList: [],
specList: [],
displacementList: [],
seatList: [],
//
countries: [],
energies: [],
prices: [],
specs: [],
seats: [],
displacements: [],
}; };
}, },
methods: { methods: {
getApi() {
getCountryS({token: this.getToken}).then(res => {
this.countryList = res.data
});
getEnergyS({token: this.getToken}).then(res => {
this.energyList = res.data
});
getPriceRangeS({token: this.getToken}).then(res => {
this.priceList = res.data
});
getSpecName1({token: this.getToken}).then(res => {
this.specList = res.data
});
getDisplacementS({token: this.getToken}).then(res => {
this.displacementList = res.data
});
getSeatS({token: this.getToken}).then(res => {
this.seatList = res.data
});
},
// //
handlerClose() { handlerClose() {
this.show = false; this.show = false;
@ -128,6 +223,12 @@ export default {
this.activeLi = n; this.activeLi = n;
let key = this.letterArr[n]; let key = this.letterArr[n];
this.showCars = this.cars.filter((ele) => ele.firstword === key); this.showCars = this.cars.filter((ele) => ele.firstword === key);
// if(n != 0) {
// this.searchForm.sFirstword = key
// } else {
// this.searchForm.sFirstword = ''
// };
// this.getUserSeriesName(this.brandname)
}, },
// //
getBrands() { getBrands() {
@ -169,35 +270,46 @@ export default {
// //
handlerChoose(n, row) { handlerChoose(n, row) {
this.showActive = row.brandid; this.showActive = row.brandid;
this.chooseBrand = row; if(row.brandname == this.brandname) { //
this.brandname = this.chooseBrand.brandname; this.brandname = "";
} else {
this.brandname = row.brandname;
}
this.getUserSeriesName(this.brandname) this.getUserSeriesName(this.brandname)
}, },
// //
handlerModel(n, row) { handlerModel(n, row) {
this.$emit("choose", row.name); this.$emit("choose", row.seriesname);
}, },
// //
handlerSubmit() { handlerSubmit() {
// if(this.chooseBrand && this.chooseModel) {
// this.$emit("change", [this.chooseBrand, this.chooseModel]);
// this.handlerClose();
// } else {
// this.$message.warning('');
// }
this.$emit("change", this.list); this.$emit("change", this.list);
}, },
// //
getUserSeriesName(brandName) { getUserSeriesName(brandName) {
if(!this.getToken) return; this.load = true;
this.form.token = this.getToken; this.searchForm.sBrand = brandName;
this.form.sBrandName = brandName; this.searchForm.sSpec = this.specs.join(',');
this.load = true; this.searchForm.sPriceRangeS = this.prices.join(',');
getUserSeriesName(this.form).then(res => { this.searchForm.sDisplacementS = this.displacements.join(',');
this.searchForm.sSeatS = this.seats.join(',');
this.searchForm.sEnergyType = this.energies.join(',');
this.searchForm.sCountryS = this.countries.join(',');
getSeriesNameByCategory(this.searchForm).then(res => {
let data = res.data || []; let data = res.data || [];
this.models = data; this.models = data;
this.load = false; this.load = false;
}) })
},
onSearch() {
this.getUserSeriesName(this.brandname)
},
selectAll() {
let arr = [];
this.models.forEach(ele => {
arr.push(ele.seriesname)
})
this.$emit("selectAll", arr);
} }
}, },
}; };
@ -206,7 +318,11 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.sb-body { .sb-body {
width: 100%; width: 100%;
height: calc(100% - 30px); height: calc(100% - 80px);
display: flex;
justify-content: flex-start;
}
.sb-tabs {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
} }

@ -16,7 +16,7 @@
<div class="card-completed" v-else></div> <div class="card-completed" v-else></div>
<v-card-button @edit="handlerEdit(item.Guids)" @del="handlerDel(item.Guids)"></v-card-button> <v-card-button @edit="handlerEdit(item.Guids)" @del="handlerDel(item.Guids)"></v-card-button>
</div> </div>
<div class="card-item-data" @click="toThemeData(item.Guids,item.Name)"> <div class="card-item-data" @click="toThemeData(item.Guids,item.Name,item.Classify)">
<div class="cid-title"> <div class="cid-title">
{{item.Name}} {{item.Name}}
</div> </div>

@ -39,10 +39,10 @@ export default {
}) })
}, },
//前往详情页 //前往详情页
toThemeData(guids,name) { toThemeData(guids,name,classify) {
this.$router.push({ this.$router.push({
path: '/specialAnalizeBoard', path: '/specialAnalizeBoard',
query: {sSpecialGuid: guids, name: name} query: {sSpecialGuid: guids, name: name, Classify: classify}
}) })
}, },
//日期 //日期

@ -43,6 +43,9 @@ export default {
created() { created() {
this.form.token = this.getToken; this.form.token = this.getToken;
this.form.sSpecialGuid = this.$route.query.sSpecialGuid; this.form.sSpecialGuid = this.$route.query.sSpecialGuid;
if(this.$route.query.Classify == 2) {
this.type = 1
}
this.getData(); this.getData();
}, },
methods: { methods: {

@ -117,6 +117,7 @@ export default {
color: #FFFFFF; color: #FFFFFF;
margin-left: 40px; margin-left: 40px;
font-weight: bold; font-weight: bold;
cursor: pointer;
} }
.v-r-res { .v-r-res {
margin-right: 16px; margin-right: 16px;

@ -29,7 +29,7 @@
</template> </template>
<script> <script>
import { getWtypeWeiBo0528 } from "@/api/WeiboDetails"; import { getWtypeWeiBo0528 } from "@/api/SpecialAnalize";
import createOpt from "./opt"; import createOpt from "./opt";
export default { export default {
name: "weiboContentType", name: "weiboContentType",

@ -63,7 +63,12 @@ export default {
getData() { getData() {
getAffectionsTimeWY(this.form).then(res => { getAffectionsTimeWY(this.form).then(res => {
let data = res.data; let data = res.data;
console.log(data); let ds = []
for(let key in data) {
let obj = {key: key, value: data[key]};
ds.push(obj);
}
this.opt = createOpt(ds, this.colors)
}) })
} }
} }

@ -34,12 +34,12 @@ export default function createOpt(ds = [], color = []) {
label: { label: {
show: false, show: false,
position: 'center', position: 'center',
lineHeight: 48 lineHeight: 36
}, },
emphasis: { emphasis: {
label: { label: {
show: true, show: true,
fontSize: '24', fontSize: '20',
color: "#ffff", color: "#ffff",
fontWeight: 'bold', fontWeight: 'bold',
formatter: function (p) { formatter: function (p) {

@ -49,8 +49,8 @@
保存 保存
</div> </div>
</div> </div>
<iSpecialBrandChoose :list="chosenBrandList" :visible.sync="brandShow" @choose="brandChose" @change="handlerBrand"></iSpecialBrandChoose> <iSpecialBrandChoose :list="chosenBrandList" :visible.sync="brandShow" @selectAll="selectAllBrand" @choose="brandChose" @change="handlerBrand"></iSpecialBrandChoose>
<iSpecialSeriesChoose brand="奥迪" :list="chosenSeriesList" :visible.sync="seriesShow" @choose="seriesChose" @change="handlerSeries"></iSpecialSeriesChoose> <iSpecialSeriesChoose brand="奥迪" :list="chosenSeriesList" :visible.sync="seriesShow" @selectAll="selectAll" @choose="seriesChose" @change="handlerSeries"></iSpecialSeriesChoose>
</div> </div>
</template> </template>
@ -166,6 +166,12 @@ export default {
handlerSeries(value) { handlerSeries(value) {
this.seriesShow = false; this.seriesShow = false;
}, },
selectAllBrand(all) {
this.chosenBrandList = [...this.chosenBrandList, ...all];
},
selectAll(all) {
this.chosenSeriesList = [...this.chosenSeriesList, ...all];
},
delBrand(index) { delBrand(index) {
if(this.form.Classify == 1) { if(this.form.Classify == 1) {
this.chosenBrandList.splice(index,1); this.chosenBrandList.splice(index,1);

Loading…
Cancel
Save