张雄 3 years ago
parent a38be158c6
commit bd3a890bbe

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

@ -16,8 +16,55 @@
<ul class="sb-ul">
<span class="liSn">按品牌拼音首字母查找:</span>
<li v-for="(item,index) in letterArr" :key="index" :class="activeLi === index ? 'lactive': ''" @click="handlerLi(index)">{{item}}</li>
<li @click="selectAll"></li>
</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-dd">
<vue-scroll>
@ -31,13 +78,12 @@
</div>
</vue-scroll>
</div>
<div class="sb-dd-right">
<vue-scroll>
<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 v-if="item.name.length > 12" style="font-size: 15px">{{item.name}}</div>
<div v-else>{{item.name}}</div>
<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.seriesname.length > 12" style="font-size: 15px">{{item.seriesname}}</div>
<div v-else>{{item.seriesname}}</div>
</div>
</div>
</vue-scroll>
@ -52,7 +98,8 @@
</template>
<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 {
name: "iSwitchModel",
props: {
@ -84,6 +131,8 @@ export default {
},
},
created() {
this.searchForm.token = this.getToken;
this.getApi();
this.brandname = this.brand;
this.modelName = this.model;
this.getBrands().then(() => {
@ -104,6 +153,18 @@ export default {
token: "",
sBrandName: ""
},
searchForm: {
token: '',
sBrand: '',
sType: 'Series',
sFirstword: '',
sSpec: '',
sPriceRangeS: '',
sDisplacementS: '',
sSeatS: '',
sEnergyType: '',
sCountryS: '',
},
letterArr: [
],
@ -114,10 +175,44 @@ export default {
chooseBrand: null,
chooseModel: null,
modelName: "",
brandname: ""
brandname: "",
//
countryList: [],
energyList: [],
priceList: [],
specList: [],
displacementList: [],
seatList: [],
//
countries: [],
energies: [],
prices: [],
specs: [],
seats: [],
displacements: [],
};
},
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() {
this.show = false;
@ -128,6 +223,12 @@ export default {
this.activeLi = n;
let key = this.letterArr[n];
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() {
@ -169,35 +270,46 @@ export default {
//
handlerChoose(n, row) {
this.showActive = row.brandid;
this.chooseBrand = row;
this.brandname = this.chooseBrand.brandname;
if(row.brandname == this.brandname) { //
this.brandname = "";
} else {
this.brandname = row.brandname;
}
this.getUserSeriesName(this.brandname)
},
//
handlerModel(n, row) {
this.$emit("choose", row.name);
this.$emit("choose", row.seriesname);
},
//
handlerSubmit() {
// if(this.chooseBrand && this.chooseModel) {
// this.$emit("change", [this.chooseBrand, this.chooseModel]);
// this.handlerClose();
// } else {
// this.$message.warning('');
// }
this.$emit("change", this.list);
},
//
getUserSeriesName(brandName) {
if(!this.getToken) return;
this.form.token = this.getToken;
this.form.sBrandName = brandName;
this.load = true;
getUserSeriesName(this.form).then(res => {
this.load = true;
this.searchForm.sBrand = brandName;
this.searchForm.sSpec = this.specs.join(',');
this.searchForm.sPriceRangeS = this.prices.join(',');
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 || [];
this.models = data;
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>
.sb-body {
width: 100%;
height: calc(100% - 30px);
height: calc(100% - 80px);
display: flex;
justify-content: flex-start;
}
.sb-tabs {
display: flex;
justify-content: flex-start;
}

@ -16,7 +16,7 @@
<div class="card-completed" v-else></div>
<v-card-button @edit="handlerEdit(item.Guids)" @del="handlerDel(item.Guids)"></v-card-button>
</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">
{{item.Name}}
</div>

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

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

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

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

@ -63,7 +63,12 @@ export default {
getData() {
getAffectionsTimeWY(this.form).then(res => {
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: {
show: false,
position: 'center',
lineHeight: 48
lineHeight: 36
},
emphasis: {
label: {
show: true,
fontSize: '24',
fontSize: '20',
color: "#ffff",
fontWeight: 'bold',
formatter: function (p) {

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

Loading…
Cancel
Save