瀏覽代碼

tijiao

dev
douzhuo 2 年之前
父節點
當前提交
5f80e6373f
共有 5 個文件被更改,包括 190 次插入84 次删除
  1. +8
    -4
      pages/index/index.vue
  2. +21
    -21
      pages/mine/messageList.vue
  3. +16
    -15
      pages/mine/reportExcel/dayReport.vue
  4. +144
    -44
      pages/mine/reportExcel/weekReport.vue
  5. +1
    -0
      uview-ui/components/u-navbar/u-navbar.vue

+ 8
- 4
pages/index/index.vue 查看文件

@@ -384,9 +384,14 @@
this.isShowUpdate = false;
},
lookDetail(){
let link = encodeURIComponent(JSON.stringify(this.content))
let datas = {
id: this.id,
title: this.tit,
content: this.content
}
this.$store.commit('setMessageObj', datas)
uni.navigateTo({
url: "../mine/messageDetail?content=" + link + "&id=" + this.id+"&tit="+this.tit
url: "../mine/messageDetail"
})
let data = {
id:this.id,
@@ -437,8 +442,7 @@
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
data:{id},
success: (res) => {
}
success: (res) => {}
})
},
updateInit() {


+ 21
- 21
pages/mine/messageList.vue 查看文件

@@ -40,7 +40,7 @@
</view>
</template>
</scroll-view>
</template>
</template>
<!-- 升级公告 -->
<template v-if="current == 1">
<scroll-view :scroll-top="scrollTop" refresher-enabled="true" :refresher-triggered="triggered"
@@ -102,28 +102,29 @@
this.pageNum = 1
this.updateInit()
},
onLoad() {
this._freshing = false;
setTimeout(() => {
this.triggered = true;
}, 1000)
},
onPullDownRefresh() {
this.initPage()
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
methods: {
onPulling(e) {
console.log("onpulling", e);
},
onRefresh() {
if (this._freshing) return;
this.updateAnnList = []
this.pageNum = 1
this.updateInit()
this._freshing = true;
setTimeout(() => {
@@ -131,26 +132,29 @@
this._freshing = false;
}, 3000)
},
onRestore() {
this.triggered = 'restore'; // 需要重置
console.log("onRestore");
},
lower(e) {
this.pageNum++
this.updateInit()
},
initPage() {
this.updateAnnList = []
this.pageNum = 1
this.updateInit()
},
// 全部标记已读
allRead() {
this.$u.get('/zkMessage/updateState', { accountId: uni.getStorageSync('weapp_session_userInfo_data').accountId, projectId: uni.getStorageSync('buildingID').id, }).then(res => {
this.$u.get('/zkMessage/updateState', {
accountId: uni.getStorageSync('weapp_session_userInfo_data').accountId,
projectId: uni.getStorageSync('buildingID').id,
}).then(res => {
uni.showToast({
title: '全部已读成功!',
duration: 2000
@@ -160,14 +164,14 @@
console.log(e)
})
},
updateInit() {
uni.request({
url: config.service.updateList,
method: "GET",
data: {
messageType: this.list[this.current].id,
projectId: uni.getStorageSync('buildingID').id,
projectId: uni.getStorageSync('buildingID').id,
id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
num: this.pageNum,
size: this.pageSize
@@ -177,14 +181,7 @@
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (res) => {
// this.updateAnnList = res.data.data.list.results
if (res.data.data == null) {
console.log(11)
uni.showToast({
title: '已经到底了!',
duration: 2000
});
} else {
if (res.data.data) {
this.count = res.data.data.sum
if (this.pageNum != 1) {
this.updateAnnList = [...this.updateAnnList, ...res.data.data.list.results];
@@ -193,6 +190,9 @@
}
}
},
fail: e => {
console.log(e)
}
})
},
@@ -202,7 +202,7 @@
url: "./messageDetail"
})
},
// 跳转日报
goReception(data, index) {
this.$store.commit('setMessageObj', data)


+ 16
- 15
pages/mine/reportExcel/dayReport.vue 查看文件

@@ -10,8 +10,8 @@
<view class="c-head-card">
<view class="c-title-text">
{{ projectName }}数智工牌日报
<text class="date">{{ weekObj.createTime | fomatDate }}</text>
</view>
<text class="date">{{ weekObj.createTime | fomatDate }}</text>
<view class="creative-time">
生成时间:{{ weekObj.createTime || '--' }}
</view>
@@ -78,7 +78,7 @@
</view>
<view class="r-box">
<view class="r-box-item-lang">
<view>平均接待时长<text>{{ weekObj.avgDuration || 0 }}m</text></view>
<view>平均接待时长<text>{{ weekObj.avgDuration || 0 }}min</text></view>
<view class="contrast">对比昨天<text
:class="{down: weekObj.avgDurationPK < 0, up: weekObj.avgDurationPK > 0}">{{ weekObj.avgDurationPK }}</text>
</view>
@@ -186,7 +186,7 @@
</view>
<view class="right">
<view class="r-title">
<text>置业顾问平均接访录音排名:</text>
<text>置业顾问平均接访时长排名:</text>
</view>
<view class="ranking">
<block v-for="(rank, rankIndex) in recording" :key="rankIndex">
@@ -284,7 +284,6 @@

<!-- 底部按钮 -->
<view class="nav-footer">

<view class="footer-item full" style="margin-left: 22rpx;">
<button open-type="share" class="fulls">
分享给好友
@@ -354,8 +353,8 @@
// 分割数组排名前三,倒三
getTopThree() {
if (this.weekObj.XJTopList && this.weekObj.XJTopList.length > 0) {
this.carryOutTop = this.weekObj.XJTopList.reverse().slice(0, 3)
this.carryOutLast = this.weekObj.XJTopList.slice(0, 3)
this.carryOutTop = this.weekObj.XJTopList.reverse().slice(0, 3)
}
if (this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0) {
this.consultant = this.weekObj.ZXLTopList.reverse().slice(0, 3)
@@ -449,18 +448,20 @@
flex-direction: column;

.c-title-text {
position: relative;
// position: relative;
flex-grow: 1;
font-size: 48rpx;
font-weight: bold;
color: #303030;
}
.date {
// position: absolute;
// right: 0;
// bottom: 6rpx;
font-size: 30rpx;
color: #303030;

.date {
position: absolute;
right: 0;
bottom: 6rpx;
font-size: 30rpx;
color: #303030;
}
}

.creative-time {
@@ -592,7 +593,7 @@
justify-content: center;

.footer-item {
width: 334rpx;
width: 686rpx;
height: 88rpx;
display: flex;
justify-content: center;


+ 144
- 44
pages/mine/reportExcel/weekReport.vue 查看文件

@@ -2,7 +2,7 @@
<view class="pages">
<!-- 导航栏 -->
<view class="nav-header">
<u-navbar title="数智工牌周报" :titles="$options.filters.getTimeLine(weekObj.createTime, 1)"></u-navbar>
<u-navbar title="数智工牌周报" :titles="weekObj.createTimeName"></u-navbar>
</view>
<!-- 日报内容部分 -->
<view class="container">
@@ -10,8 +10,8 @@
<view class="c-head-card">
<view class="c-title-text">
{{ projectName || '' }}数智工牌周报
<text class="date">{{ weekObj.createTime | getTimeLine }}</text>
</view>
<text class="date">{{ getTimeLine(weekObj.createTime) }}</text>
<view class="creative-time">
生成时间:{{ weekObj.createTime || '--' }}
</view>
@@ -53,7 +53,7 @@
<view class="execution-ranking-title">
销讲场景执行排名
</view>
<template v-if="weekObj.fractionPK && weekObj.fractionPK != 0">
<template v-if="isShowXJTop1List">
<view class="execution-ranking-desc">
<text>销讲场景平均执行对比上周</text>
<text>{{ rankTop('fractionPKName') }}</text>
@@ -91,7 +91,7 @@
<view class="statistics-title">
接待统计
</view>
<template v-if="weekObj.customerInfo1 && weekObj.customerInfo2">
<template v-if="rankTop('ranktype')&&rankTop('people')&&weekObj.customerInfo1">
<view class="statistics-desc">
<text>
顾问平均执行率对比上周
@@ -149,8 +149,8 @@
<view class="guwen-ranking-title">
顾问销讲执行率排名(TOP10)
</view>
<template v-if="weekObj.ZXLTopList && weekObj.ZXLTopList.length > 0">
<!-- 排名百分比列表 -->
<template v-if="isShowZXLTopList">
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
<view class="ranking-item">
@@ -179,7 +179,7 @@
顾问接待量排名(TOP10)
</view>

<template v-if="weekObj.JDLTopList && weekObj.JDLTopList.length > 0">
<template v-if="isShowJDLTopList">
<!-- 排名百分比列表 -->
<view class="ranking-box">
<block v-for="(percent, index) in weekObj.JDLTopList" :key="index">
@@ -204,7 +204,7 @@
</view>

<!-- 使用建议 -->
<view class="proposal">
<view class="proposal" v-if="false">
<view class="proposal-title">
使用建议
</view>
@@ -237,9 +237,11 @@
</view>

<!-- 底部按钮 -->
<view class="footer">
<view class="footer-item">

<view class="nav-footer">
<view class="footer-item full" style="margin-left: 22rpx;">
<button open-type="share" class="fulls">
分享给好友
</button>
</view>
</view>
</view>
@@ -301,7 +303,7 @@
percent: '',
percentName: 'activeCustomerPK',
preNum: '', // 上周数量
preNumName: 'receptionCount2', //
preNumName: 'activeCustomer2', //
},
{
name: '平均执行率(%)',
@@ -310,7 +312,7 @@
percent: '',
percentName: 'fractionPK',
preNum: '', // 上周数量
preNumName: 'receptionCount2', //
preNumName: 'fraction2', //
},
{
name: '平均接待时长(分)',
@@ -319,7 +321,7 @@
percent: '',
percentName: 'avgDurationPK',
preNum: '', // 上周数量
preNumName: 'receptionCount2', //
preNumName: 'avgDuration2', //
},
{
name: '违禁接待 (次)',
@@ -371,31 +373,66 @@
// 排名最高与最低
rankTop() {
return name => {
let obj = {
ranktype: (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? '上升' : '下降',
people: Math.abs(this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length),
topName: this.weekObj.customerInfo1[0].name,
topPk: Math.abs(this.weekObj.customerInfo1[0].pk),
lastName: this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].name,
lastPk: Math.abs(this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].pk), //
class: (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? 'up' : 'down',
fractionPKName: this.weekObj.fractionPK > 0 ? '上涨' : '下跌',
fractionPK: Math.abs(this.weekObj.fractionPK),
fractionBastName: this.weekObj.XJTop1List[0].title,
fractionBastValue: this.weekObj.XJTop1List[0].value,
fractionLastName: this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].title,
fractionLastValue: this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].value,
let obj = {}
try {
if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
obj.ranktype = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? '上升' : '下降'
obj.people = Math.abs(this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length)
}
if (this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0) {
obj.topName = this.weekObj.customerInfo1[0].name
obj.topPk = Math.abs(this.weekObj.customerInfo1[0].pk)
obj.lastName = this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].name,
obj.lastPk = Math.abs(this.weekObj.customerInfo1[this.weekObj.customerInfo1.length-1].pk)
}
if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
obj.class = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? 'up' : 'down'
}
if (this.weekObj.fractionPK) {
obj.fractionPKName = this.weekObj.fractionPK > 0 ? '上涨' : '下跌'
obj.fractionPK = Math.abs(this.weekObj.fractionPK)
}
if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
obj.fractionBastName = this.weekObj.XJTop1List[0].title
obj.fractionBastValue = this.weekObj.XJTop1List[0].value
}
if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
obj.fractionLastName = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].title
obj.fractionLastValue = this.weekObj.XJTop1List[this.weekObj.XJTop1List.length-1].value
}
return obj[name] || ''
} catch(e) {
console.log(e)
return ''
}
return obj[name]
}
},
isShowXJTop1List () {
return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length
},
isShowZXLTopList() {
return this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0
},
isShowJDLTopList() {
return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0
},
},

onLoad(option) {
if (option.id) this.id = option.id
this.getMessage()
console.log(this.weekObj, '12312312312')
console.log(JSON.stringify(this.weekObj), '12312312312')
},


@@ -420,10 +457,12 @@
this.bubbleSort(data.customerInfo2, 'pk')
data.customerInfo1.reverse()
data.customerInfo2.reverse()
this.weekObj = {
...res.zkMessage,
...data
}
this.weekObj.createTimeName = this.getTimeLine(this.weekObj.createTime, 1)
console.log(this.weekObj, 'this.weekObj')
this.projectName = res.projectName
this.numlist.forEach(item => {
@@ -480,6 +519,7 @@
this.weekObj[item + 'List'].reverse()
}
})
console.log(this.weekObj, '12312312312')
},

// 冒泡排序
@@ -496,6 +536,28 @@
}
}
},
// 转换时间
getTimeLine(date, type = 1) {
let resu = '--'
if (!date) return resu
let time = new Date(date)
time.setDate(time.getDate() - 7)
let arr = date.split(' ')
let str = arr[0]
let result = str.split('-')
let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1)
let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate()
if (type == 1) {
resu = `${m}.${d}-${result[1]}.${result[2]}`
} else {
resu = `${m}月${d}日~${result[1]}月${result[2]}日`
}
return resu
},
},

filters: {
@@ -579,18 +641,19 @@
flex-direction: column;

.c-title-text {
position: relative;
// position: relative;
flex-grow: 1;
font-size: 48rpx;
font-weight: bold;
color: #303030;
}
.date {
// position: absolute;
// right: 0;
// bottom: 6rpx;
font-size: 30rpx;
color: #303030;

.date {
position: absolute;
right: 0;
bottom: 6rpx;
font-size: 30rpx;
color: #303030;
}
}

.creative-time {
@@ -612,7 +675,7 @@
align-items: center;
border: 1rpx solid #E0E0E0;
font-size: 32rpx;
font-weight: 600;
font-weight: bold;
}

.briefing-box {
@@ -674,7 +737,7 @@

.execution-ranking-title {
font-size: 32rpx;
font-weight: 500;
font-weight: bold;
}

.execution-ranking-desc {
@@ -723,6 +786,8 @@
.statistics-title {
padding: 30rpx 30rpx 0;
width: 100%;
font-size: 32rpx;
font-weight: bold;
}

.statistics-desc {
@@ -895,6 +960,41 @@
}

}
.nav-footer {
margin: 32rpx 0;
width: 100%;
display: flex;
justify-content: center;
.footer-item {
width: 686rpx;
height: 88rpx;
display: flex;
justify-content: center;
align-items: center;
color: #2671E2;
border: 2rpx solid #2671E2;
border-radius: 8rpx;
overflow: hidden;
font-size: 32rpx;
&.full {
background: #2671E2;
color: #fff;
.fulls {
width: 100%;
height: 100%;
background: transparent;
color: #fff;
}
}
}
}

.up {
color: #E6273A;
@@ -910,8 +1010,8 @@
display: flex;
justify-content: center;
align-items: center;
font-size: 32rpx;
font-weight: 600;
font-size: 28rpx;
color: #666666;
}
}
</style>

+ 1
- 0
uview-ui/components/u-navbar/u-navbar.vue 查看文件

@@ -291,6 +291,7 @@ export default {
}

.u-titles {
margin-bottom: 15rpx;
font-size: 24rpx;
text-align: center;
}


Loading…
取消
儲存