张雄 3 years ago
parent edfc12766b
commit d032495c99

@ -78,7 +78,7 @@ export default {
<style lang="less" scoped>
.wct-outter {
width: 936px;
height: 460px;
height: 412px;
border: 2px solid #0f2a4d;
margin-left: 16px;
overflow: hidden;

@ -8,7 +8,7 @@
</v-label-div-light>
<div :class="getIsLight?'lightSy':'dark'">
<a-menu mode="inline" style="width: 15%" @openChange="handlerMenu" theme="dark">
<a-sub-menu title="筛选项" key="sub1">
<a-sub-menu :title="filterActive.length!=0?'隐藏筛选项':'显示筛选项'" key="sub1">
</a-sub-menu>
</a-menu>
</div>
@ -63,7 +63,7 @@
<a-form-model :class="getIsLight?'lightSy':'dark'" layout="inline">
<a-form-model-item label="选择日期">
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
<a-month-picker style="width: 146px;margin-left: 16px;" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
<a-button style="margin-left: 16px;" type="primary" icon="plus" @click="hanlderAddSeries"></a-button>
</a-form-model-item>
</a-form-model>
@ -73,6 +73,7 @@
<span v-for="(item, index) in stableList" :key="index">
<a-button style="margin-left: 12px;margin-bottom: 12px" @click="onDeleteStable(index)" ghost type="primary">{{item.Name}}<a-icon type="close" /></a-button>
</span>
<a-button style="margin-left: 12px;margin-bottom: 12px" ghost type="primary" icon="plus" @click="hanlderAddStable"></a-button>
</div>
</div>
<div class="d2" :class="getIsLight?'lightSy':'dark'" v-if="filterActive.length!=0">
@ -81,6 +82,7 @@
</span>
</div>
<iSaleModelChoose :brand="brand" :model="model" :visible.sync="modelShow" @change="handlerBrand"></iSaleModelChoose>
<iSaleModelChoose :brand="brand" :model="model" :visible.sync="modelShowStable" @change="handlerBrandStable"></iSaleModelChoose>
<div class="d3" v-if="getIsLight">
<v-echarts :opt="opt2"></v-echarts>
</div>
@ -139,6 +141,7 @@ export default {
extraData: [],
//
modelShow: false,
modelShowStable: false,
brand: '奥迪',
model: '',
//
@ -210,6 +213,9 @@ export default {
hanlderAddSeries() {
this.modelShow = true;
},
hanlderAddStable() {
this.modelShowStable = true;
},
handlerBrand(val) {
if(val) {
if(this.seriesList.indexOf(val[1].name) != -1) {
@ -240,6 +246,33 @@ export default {
})
this.modelShow = false;
},
handlerBrandStable(val) {
if(val) {
if(this.seriesList.indexOf(val[1].name) != -1) {
this.$message.error('该车型已存在')
return false
}
};
let obj = {
token: this.form.token,
sSeriesName: val[1].name,
sTimeType: 4,
sStartTime: this.selTime[0],
sEndTime: this.selTime[1],
};
getSalesCompetitionAnalysis(obj).then(res => {
let data = res.data;
// [ ['extra'],[] ]
data.forEach(ele => {
let item = [ele.CheChang * 1, ele.MainPrice, ele.Count, ele.Name, 'total'];
this.totalData.push(item);
this.stableList.push(ele);
});
this.opt = createOpt(this.totalData, this.extraData);
this.opt2 = createOptLight(this.totalData, this.extraData)
})
this.modelShow = false;
},
//
onDelete(index) {
this.seriesList.splice(index,1);

@ -8,7 +8,7 @@
</v-label-div-light>
<div :class="getIsLight?'lightSy':'dark'">
<a-menu mode="inline" style="width: 15%" @openChange="handlerMenu" theme="dark">
<a-sub-menu title="筛选项" key="sub1">
<a-sub-menu :title="filterActive.length!=0?'隐藏筛选项':'显示筛选项'" key="sub1">
</a-sub-menu>
</a-menu>
</div>
@ -63,7 +63,7 @@
<a-form-model layout="inline">
<a-form-model-item label="选择日期" :class="getIsLight?'lightSy':'dark'">
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[0]" valueFormat="YYYY-MM" placeholder="开始日期"></a-month-picker>
<a-month-picker style="width: 146px" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
<a-month-picker style="width: 146px;margin-left: 16px;" :allowClear="false" v-model="selTime[1]" valueFormat="YYYY-MM" placeholder="结束日期"></a-month-picker>
<a-button style="margin-left: 12px" type="primary" icon="plus" @click="hanlderAddSeries"></a-button>
</a-form-model-item>
</a-form-model>

@ -132,7 +132,7 @@ export default {
<style lang="less">
.tp20-outter {
width: 1552px;
height: 965px;
height: 768px;
border: 2px solid #0f2a4d;
.d2 {
display: flex;

Loading…
Cancel
Save