Browse Source

首页加接待提醒的弹窗

branch0222
corala 2 years ago
parent
commit
b1aac3739c
3 changed files with 89 additions and 59 deletions
  1. +1
    -47
      package-lock.json
  2. +2
    -1
      package.json
  3. +86
    -11
      pages/index/index.vue

+ 1
- 47
package-lock.json View File

@@ -1,49 +1,3 @@
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"base64-arraybuffer": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
},
"css-line-break": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/css-line-break/-/css-line-break-2.1.0.tgz",
"integrity": "sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w==",
"requires": {
"utrie": "^1.0.2"
}
},
"html2canvas": {
"version": "1.4.1",
"resolved": "https://registry.npmmirror.com/html2canvas/-/html2canvas-1.4.1.tgz",
"integrity": "sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA==",
"requires": {
"css-line-break": "^2.1.0",
"text-segmentation": "^1.0.3"
}
},
"text-segmentation": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/text-segmentation/-/text-segmentation-1.0.3.tgz",
"integrity": "sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw==",
"requires": {
"utrie": "^1.0.2"
}
},
"utrie": {
"version": "1.0.2",
"resolved": "https://registry.npmmirror.com/utrie/-/utrie-1.0.2.tgz",
"integrity": "sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw==",
"requires": {
"base64-arraybuffer": "^1.0.2"
}
},
"wxml2canvas": {
"version": "1.0.1",
"resolved": "https://registry.npmmirror.com/wxml2canvas/-/wxml2canvas-1.0.1.tgz",
"integrity": "sha512-AdWvxgTjJtW/m6Cki1cwGO0HOERKU8O9V3RcCz8UyqJbrPF7e8Nv27/epYiIs64HlbPTKWTLl7ECjQi6UVducA=="
}
}
"lockfileVersion": 1
}

+ 2
- 1
package.json View File

@@ -92,5 +92,6 @@
}
}
}
}
},
"dependencies": {}
}

+ 86
- 11
pages/index/index.vue View File

@@ -89,8 +89,6 @@
</view>
</view>



<view class="title">实时统计</view>
<view class="real-timebox">
<view class="timebox">
@@ -213,6 +211,22 @@
</view>
</view>
</view>
<u-popup v-model="modalShow" border-radius="12" mode="center">
<view class="modal-box">
<view class="modal-title">今日接待</view>
<view class="number-box">
<view class="item">
<view class="num">{{realtimeobj.receptionCount+realtimeobj.receivingCustomer || 0}}</view>
<view class="num-text">接待次数</view>
</view>
<view class="item">
<view class="num">{{realtimeobj.tagCustomer || 0}}</view>
<view class="num-text">未标顾问</view>
</view>
</view>
<view class="get" @click="modalShow=false">我知道了</view>
</view>
</u-popup>
<!-- 加载组件 -->
<loading v-model="LOADING"></loading>
<u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
@@ -232,6 +246,7 @@

data() {
return {
modalShow: false,
id: "",
isShowUpdate: false,
tit: "",
@@ -501,9 +516,14 @@
//获取权限
getMenu() {
this.$u.get("/user/getMenu").then(data => {
console.log(data)
uni.setStorageSync("weapp_session_Menu_data", data)
this.Menulist = uni.getStorageSync('weapp_session_Menu_data');
// console.log(this.Menulist, 'adasdasds123')
if (this.Menulist.findIndex(item => item.name == '今日接待弹框') != -1) {
this.modalShow = true
} else {
this.modalShow = false
}
})
},
//自定义时间
@@ -574,15 +594,15 @@
return
} else {
this.realtimeobj = {
sumCustomer: data.data.data.sumCustomer,
receivingCustomer: data.data.data.receivingCustomer,
activeCustomer: data.data.data.activeCustomer,
prohibitedCustomer: data.data.data.prohibitedCustomer,
sumCustomer: data.data.data.sumCustomer||0,
receivingCustomer: data.data.data.receivingCustomer||0,
activeCustomer: data.data.data.activeCustomer||0,
prohibitedCustomer: data.data.data.prohibitedCustomer||0,
avgDuration: Math.floor(data.data.data.avgDuration / 60) || 0,
tagCustomer: data.data.data.tagCustomer,
fraction: data.data.data.fraction,
wordFinishFraction: data.data.data.wordFinishFraction,
receptionCount: data.data.data.receptionCount
tagCustomer: data.data.data.tagCustomer||0,
fraction: data.data.data.fraction||0,
wordFinishFraction: data.data.data.wordFinishFraction||0,
receptionCount: data.data.data.receptionCount||0
}
}
},
@@ -845,6 +865,61 @@
</script>

<style lang="scss" scoped>
.modal-box{
display: flex;
flex-direction: column;
align-items: center;
width: 590rpx;
padding: 50rpx 30rpx 60rpx;
.modal-title{
text-align: center;
height: 45rpx;
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
line-height: 45rpx;
margin-bottom: 60rpx;
}
.number-box{
width: 100%;
display: flex;
justify-content: space-around;
margin-bottom: 80rpx;
.item{
display: flex;
flex-direction: column;
align-items: center;
.num{
margin-bottom: 12rpx;
height: 60rpx;
font-size: 42rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333333;
line-height: 60rpx;
margin-bottom: 12rpx;
}
.num-text{
height: 45rpx;
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 45rpx;
}
}
}
.get{
width: 400rpx;
height: 80rpx;
background: #3E50E8;
border-radius: 8rpx;
text-align: center;
line-height: 80rpx;
color: #fff;
}
}
.update {
width: 100%;
height: 100%;


Loading…
Cancel
Save