Commit 0ad00942 by 徐忆琳

Merge branch 'v3.21.0_10' into 'v3.21.0'

修复bug

See merge request !172
2 parents 9f6b10ff 71adb487
......@@ -26,7 +26,7 @@
</div>
<img src="./assets/logo.png" alt="" srcset="" />
</div> -->
<keep-alive exclude="clientDetail,clientGroupDetail,clientGroupManage,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage,marketingPeople,grouping">
<keep-alive exclude="clientDetail,clientGroupDetail,clientGroupManage,tagsManage,clientDataOverview,guestGroup,guestGroupAdd,guestGroupDetail,group,viewCustomers,crowdDetail,crowdAdd,crowdManage,leadBasicInfo,leadAllocation,leadManage,marketingPeople,grouping,import">
<router-view></router-view>
</keep-alive>
</div>
......
......@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) {
return Promise.resolve(cfg)
}
return new Http({ request: { timeout: 3000 } }).get('https://oss-config.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
return new Http({ request: { timeout: 3000 } }).get('https://oss-config.dev.glsx.com.cn/mock/616d3b131072f92988f05a01/custom/config2')
//开发环境mock
// return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2')
}
......
......@@ -376,6 +376,7 @@ export default {
this.datacubeNotice()
this.queryCrowdTree()
},
beforeDestroy() {
this.$notify.closeAll()
}
......
......@@ -4,7 +4,10 @@
<div class="avatar male"></div>
<span>男</span>
<div class="progress">
<div class="fill male" :style="{ width: malePercentage + '%' }">{{ malePercentage || 0 }}%</div>
<div class="fill male" :style="{ width: malePercentage==0? 50: malePercentage+ '%' }">{{
malePercentage || 0
}}%
</div>
</div>
<span class="male-count">{{ maleCount }}人</span>
</div>
......@@ -12,7 +15,9 @@
<div class="avatar female"></div>
<span>女</span>
<div class="progress">
<div class="fill female" :style="{ width: femalePercentage + '%' }">{{femalePercentage || 0}}%</div>
<div class="fill female" :style="{ width: femalePercentage== 0?50:femalePercentage + '%' }">
{{ femalePercentage || 0 }}%
</div>
</div>
<span class="female-count">{{ femaleCount }}人</span>
</div>
......@@ -23,22 +28,30 @@
export default {
name: "UserStats",
props:{
maleCount:{
props: {
maleCount: {
type: String,
default: '',
},
femaleCount:{
femaleCount: {
type: String,
default: '',
}
},
computed: {
malePercentage() {
return (this.maleCount / (this.maleCount + this.femaleCount)) * 100;
let percentage = (this.maleCount / (this.maleCount + this.femaleCount)) * 100;
return (isNaN(percentage) ? 0 : percentage.toFixed(2));
},
femalePercentage() {
return 100 - this.malePercentage;
if (this.maleCount + this.femaleCount == 0){
return 0
}else {
return 100 - this.malePercentage;
}
}
}
};
......@@ -77,6 +90,7 @@ export default {
width: 10vw;
height: 2.5vh;
margin: 10px 0;
.fill {
height: 100%;
line-height: 2.5vh;
......@@ -88,7 +102,7 @@ export default {
padding-left: 10px;
text-align: left;
background: #5A64FF;
border-top-left-radius: 25px; // 左上角圆角
border-top-left-radius: 25px; // 左上角圆角
border-bottom-left-radius: 25px; // 左下角圆角
clip-path: polygon(0 0, 100% 0%, 85% 100%, 0% 100%); // 右侧切面
}
......@@ -104,13 +118,13 @@ export default {
}
}
.male-count{
.male-count {
color: #5A64FF;
font-size: 14px;
text-align: left;
}
.female-count{
.female-count {
color: #FF5A92;
font-size: 14px;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!