Commit 68b037d7 by 姜雷

Merge branch 'test' into 'master'

Test See merge request !120
parents e1d900bc f47261e1
......@@ -22,6 +22,7 @@
:customerId="customerId"
:visible="visible"
:showMoney="showMoney"
:showCellphone="showCellphone"
ref="userContent"
>
<button
......@@ -65,6 +66,10 @@ export default {
type: Boolean,
default: false,
},
showCellphone: {
type: Boolean,
default: false,
},
},
mixins: [Popup],
// mounted() {
......
......@@ -77,6 +77,10 @@ export default {
type: Boolean,
default: false,
},
showCellphone: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -128,6 +132,7 @@ export default {
customerId={this.customerId}
visible={this.visible}
showMoney={this.showMoney}
showCellphone={this.showCellphone}
title={this.title}
fullscreen={this.fullscreen}
top={this.top}
......@@ -152,6 +157,7 @@ export default {
customerId={this.customerId}
visible={this.visible}
showMoney={this.showMoney}
showCellphone={this.showCellphone}
title={this.title}
fullscreen={this.fullscreen}
top={this.top}
......
......@@ -73,7 +73,8 @@
<span>{{getTypeLabel(customerType)}}</span>
</div>
<div class="UserInfo-Name-Col">
<span>{{$formatePhone(customerPhone)}}</span>
<span v-if="showCellphone">{{customerPhone}}</span>
<span v-else>{{$formatePhone(customerPhone)}}</span>
<span>{{getSexLabel(customerSex)}}</span>
</div>
</div>
......@@ -144,6 +145,10 @@ export default {
showEdit: { type: Function, default: () => {} },
showAccount: { type: Function, default: () => {} },
toggleLock: { type: Function, default: () => {} },
showCellphone: {
type: Boolean,
default: false,
},
},
mixins: [getUserInfoLabelMixin],
data() {
......
......@@ -15,7 +15,8 @@
<span>{{getTypeLabel(customerBaseInfo.customerType)}}</span>
</div>
<div class="UserInfo-Name-Col">
<span>{{$formatePhone(customerBaseInfo.customerPhone)}}</span>
<span v-if="showCellphone">{{customerBaseInfo.customerPhone}}</span>
<span v-else>{{$formatePhone(customerBaseInfo.customerPhone)}}</span>
<span>{{getSexLabel(customerBaseInfo.customerSex)}}</span>
</div>
</div>
......@@ -84,6 +85,12 @@ import UserBaseInfoMixin from '../../mixins/user/userBaseInfo.js';
import getUserInfoLabelMixin from '@/mixins/user/getUserInfoLabel.js';
export default {
props: {
showCellphone: {
type: Boolean,
default: false,
},
},
mixins: [UserBaseInfoMixin, getUserInfoLabelMixin],
};
</script>
......
......@@ -6,6 +6,7 @@
:customerId="customerId"
:customerPhone="customerPhone"
:showMoney="showMoney"
:showCellphone="showCellphone"
:visible="visible"
ref="UserInfo"
/>
......@@ -45,6 +46,10 @@ export default {
type: Boolean,
default: false,
},
showCellphone: {
type: Boolean,
default: false,
},
},
methods: {
refreshBeanData() {
......
......@@ -31,11 +31,6 @@ export default {
},
},
mixins: [areaMixin],
computed: {
areaList() {
return this[`areaList${this.accessType}`];
},
},
methods: {
changeHandle(val) {
if (val) {
......
......@@ -28,6 +28,9 @@ export default {
},
computed: {
...mapGetters('area', getterList),
areaList() {
return this[`areaList${this.accessType}`];
},
},
methods: {
...mapActions('area', actionsList),
......
......@@ -55,7 +55,7 @@ export default {
useHtml: true,
containerTpl: `
<div class="g2-legend">
<ul class="g2-legend-list" style="list-style-type:none;margin:0;padding:0;"></ul>
<ul class="g2-legend-list legend-CampusRank" style="list-style-type:none;margin:0;padding:0;"></ul>
</div>`,
itemTpl: (value, color, checked, index) => {
const obj = this.data[index];
......@@ -66,6 +66,7 @@ export default {
class="g2-legend-list-item item-${index} ${checked}"
data-value="${value}"
data-color=${color}
data-index=${index}
style="cursor: pointer;font-size:14px;width:100%;"
>
<i
......@@ -137,6 +138,7 @@ export default {
this.changeSelected(this.data[0]);
this.updateCampusName(this.data[0]);
this.SelectedDataIndex = this.data[0];
this.bindClickLegendHandle();
} else {
this.updateCampusName();
this.SelectedDataIndex = null;
......@@ -144,6 +146,8 @@ export default {
},
clickHandle(ev) {
let data = ev.data._origin;
console.log(data);
if (this.SelectedDataIndex.areaId !== data.areaId) {
this.SelectedDataIndex = data;
this.changeSelected(data);
......@@ -152,11 +156,55 @@ export default {
} else {
this.showOtherNameHandle();
}
} else {
let selected = this.chartGeom._getSelectedShapes();
if (selected && selected.length) {
this.chartGeom.clearActivedShapes();
this.chartGeom.clearSelected();
} else {
this.chartGeom.setSelected(data);
}
}
},
bindClickLegendHandle() {
let ulDom = document.querySelector('.legend-CampusRank');
ulDom.removeEventListener('click', this.clickLegendHandle);
ulDom.addEventListener('click', this.clickLegendHandle);
},
clickLegendHandle(ev) {
let liDom = null;
if (ev.target.tagName === 'LI') {
liDom = ev.target;
} else {
liDom = ev.target.parentElement;
}
const index = Number(liDom.dataset.index);
if (isNaN(index)) {
return;
}
// this.chart.eachShape(function(data, shape, gemo) {
// console.log(gemo);
// });
this.chartGeom.clearActivedShapes();
const data = this.data[index];
if (this.SelectedDataIndex.areaId !== data.areaId) {
this.SelectedDataIndex = data;
this.chartGeom.setSelected(data);
this.changeSelected(data);
if (data.areaId) {
this.changeCampusHandle(data);
} else {
this.showOtherNameHandle();
}
}
},
changeSelected(data) {
this.percentDom = document.querySelector('.CampusRank-percent');
this.areaNameDom = document.querySelector('.CampusRank-areaName');
// this.areaNameDom = document.querySelector('.CampusRank-areaName');
if (this.percentDom) {
if (this.total === 0) {
this.percentDom.innerHTML = '0.00';
......@@ -166,9 +214,9 @@ export default {
);
}
}
if (this.areaNameDom) {
this.areaNameDom.innerHTML = data.areaName;
}
// if (this.areaNameDom) {
// this.areaNameDom.innerHTML = data.areaName;
// }
},
},
};
......
......@@ -50,7 +50,7 @@ export default {
useHtml: true,
containerTpl: `
<div class="g2-legend">
<ul class="g2-legend-list" style="list-style-type:none;margin:0;padding:0;"></ul>
<ul class="g2-legend-list legend-SeviceRatio" style="list-style-type:none;margin:0;padding:0;"></ul>
</div>`,
itemTpl: (value, color, checked, index) => {
const obj = this.data[index];
......@@ -61,6 +61,7 @@ export default {
class="g2-legend-list-item item-${index} ${checked}"
data-value="${value}"
data-color=${color}
data-index=${index}
style="cursor: pointer;font-size:14px;width:100%;"
>
<i
......@@ -122,6 +123,7 @@ export default {
this.chartGeom.setSelected(this.data[0]);
this.changeSelected(this.data[0]);
this.SelectedDataIndex = this.data[0];
this.bindClickLegendHandle();
}
},
clickHandle(ev) {
......@@ -130,6 +132,42 @@ export default {
this.SelectedDataIndex = data;
this.changeSelected(data);
this.changeServiceHandle(data);
} else {
let selected = this.chartGeom._getSelectedShapes();
if (selected && selected.length) {
this.chartGeom.clearActivedShapes();
this.chartGeom.clearSelected();
} else {
this.chartGeom.setSelected(data);
}
}
},
bindClickLegendHandle() {
let ulDom = document.querySelector('.legend-SeviceRatio');
ulDom.removeEventListener('click', this.clickLegendHandle);
ulDom.addEventListener('click', this.clickLegendHandle);
},
clickLegendHandle(ev) {
let liDom = null;
if (ev.target.tagName === 'LI') {
liDom = ev.target;
} else {
liDom = ev.target.parentElement;
}
const index = Number(liDom.dataset.index);
if (isNaN(index)) {
return;
}
this.chartGeom.clearActivedShapes();
const data = this.data[index];
console.log(liDom, data);
if (this.SelectedDataIndex.serviceId !== data.serviceId) {
this.SelectedDataIndex = data;
this.chartGeom.setSelected(data);
this.changeSelected(data);
}
},
changeSelected(data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment