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 @@ ...@@ -26,7 +26,7 @@
</div> </div>
<img src="./assets/logo.png" alt="" srcset="" /> <img src="./assets/logo.png" alt="" srcset="" />
</div> --> </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> <router-view></router-view>
</keep-alive> </keep-alive>
</div> </div>
......
...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) { ...@@ -18,7 +18,7 @@ export const fetchConfig = function(isEnv = true) {
return Promise.resolve(cfg) 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 //开发环境mock
// return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2') // return new Http({ request: { timeout: 3000 } }).get('http://192.168.3.171:7300/mock/616d3b131072f92988f05a01/custom/config2')
} }
......
...@@ -376,6 +376,7 @@ export default { ...@@ -376,6 +376,7 @@ export default {
this.datacubeNotice() this.datacubeNotice()
this.queryCrowdTree() this.queryCrowdTree()
}, },
beforeDestroy() { beforeDestroy() {
this.$notify.closeAll() this.$notify.closeAll()
} }
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
<div class="avatar male"></div> <div class="avatar male"></div>
<span>男</span> <span>男</span>
<div class="progress"> <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> </div>
<span class="male-count">{{ maleCount }}人</span> <span class="male-count">{{ maleCount }}人</span>
</div> </div>
...@@ -12,7 +15,9 @@ ...@@ -12,7 +15,9 @@
<div class="avatar female"></div> <div class="avatar female"></div>
<span>女</span> <span>女</span>
<div class="progress"> <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> </div>
<span class="female-count">{{ femaleCount }}人</span> <span class="female-count">{{ femaleCount }}人</span>
</div> </div>
...@@ -23,22 +28,30 @@ ...@@ -23,22 +28,30 @@
export default { export default {
name: "UserStats", name: "UserStats",
props:{ props: {
maleCount:{ maleCount: {
type: String, type: String,
default: '', default: '',
}, },
femaleCount:{ femaleCount: {
type: String, type: String,
default: '', default: '',
} }
}, },
computed: { computed: {
malePercentage() { 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() { femalePercentage() {
return 100 - this.malePercentage; if (this.maleCount + this.femaleCount == 0){
return 0
}else {
return 100 - this.malePercentage;
}
} }
} }
}; };
...@@ -77,6 +90,7 @@ export default { ...@@ -77,6 +90,7 @@ export default {
width: 10vw; width: 10vw;
height: 2.5vh; height: 2.5vh;
margin: 10px 0; margin: 10px 0;
.fill { .fill {
height: 100%; height: 100%;
line-height: 2.5vh; line-height: 2.5vh;
...@@ -88,7 +102,7 @@ export default { ...@@ -88,7 +102,7 @@ export default {
padding-left: 10px; padding-left: 10px;
text-align: left; text-align: left;
background: #5A64FF; background: #5A64FF;
border-top-left-radius: 25px; // 左上角圆角 border-top-left-radius: 25px; // 左上角圆角
border-bottom-left-radius: 25px; // 左下角圆角 border-bottom-left-radius: 25px; // 左下角圆角
clip-path: polygon(0 0, 100% 0%, 85% 100%, 0% 100%); // 右侧切面 clip-path: polygon(0 0, 100% 0%, 85% 100%, 0% 100%); // 右侧切面
} }
...@@ -104,13 +118,13 @@ export default { ...@@ -104,13 +118,13 @@ export default {
} }
} }
.male-count{ .male-count {
color: #5A64FF; color: #5A64FF;
font-size: 14px; font-size: 14px;
text-align: left; text-align: left;
} }
.female-count{ .female-count {
color: #FF5A92; color: #FF5A92;
font-size: 14px; font-size: 14px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!