Browse Source

tijiao

dev
douzhuo 2 years ago
parent
commit
6f261ba5a1
4 changed files with 232 additions and 153 deletions
  1. +19
    -18
      pages.json
  2. +61
    -4
      pages/mine/messageList.vue
  3. +39
    -27
      pages/reportExcel/dayReport.vue
  4. +113
    -104
      pages/reportExcel/weekReport.vue

+ 19
- 18
pages.json View File

@@ -60,6 +60,25 @@
"navigationBarBackgroundColor": "#2671E2", "navigationBarBackgroundColor": "#2671E2",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},
{
"path": "pages/reportExcel/dayReport",
"style": {
"navigationBarTitleText": "数智工牌日报",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/reportExcel/weekReport",
"style": {
"navigationBarTitleText": "数智工牌周报",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
} }
], ],
//这下面是分包 //这下面是分包
@@ -234,24 +253,6 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},
{
"path": "reportExcel/dayReport",
"style": {
"navigationBarTitleText": "数智工牌日报",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
},
{
"path": "reportExcel/weekReport",
"style": {
"navigationBarTitleText": "数智工牌周报",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}, { }, {
"path": "selectBuilding", "path": "selectBuilding",
"style": { "style": {


+ 61
- 4
pages/mine/messageList.vue View File

@@ -4,7 +4,7 @@
<view class="m-nav"> <view class="m-nav">
<view class="m-n-lside"> <view class="m-n-lside">
<image src="@/static/images/notice.png" mode=""></image> <image src="@/static/images/notice.png" mode=""></image>
全部{{ count }}条消息
全部{{ count }}条消息
</view> </view>
<view class="m-n-rside" @click="allRead"> <view class="m-n-rside" @click="allRead">
全部已读 全部已读
@@ -24,7 +24,15 @@
<view class="upgradeItem" @click="goReception(item, index)"> <view class="upgradeItem" @click="goReception(item, index)">
<view class="right"> <view class="right">
<view class="title"> <view class="title">
<template v-if="item.messageType == 2">
{{ getTimeLine(item.createTime, '2') }}
</template>
<template v-else>
{{ fomatDate(item.createTime) }}
</template>
{{item.title}} {{item.title}}
<template v-if="item.readFlag==0"> <template v-if="item.readFlag==0">
<view class="notRead"></view> <view class="notRead"></view>
</template> </template>
@@ -101,6 +109,7 @@
this.updateAnnList = [] this.updateAnnList = []
this.pageNum = 1 this.pageNum = 1
this.updateInit() this.updateInit()
this.getMessageNotRed()
}, },
onLoad() { onLoad() {
@@ -182,7 +191,6 @@
}, },
success: (res) => { success: (res) => {
if (res.data.data) { if (res.data.data) {
this.count = res.data.data.sum
if (this.pageNum != 1) { if (this.pageNum != 1) {
this.updateAnnList = [...this.updateAnnList, ...res.data.data.list.results]; this.updateAnnList = [...this.updateAnnList, ...res.data.data.list.results];
} else { } else {
@@ -203,20 +211,69 @@
}) })
}, },
// 获取未读消息数量
getMessageNotRed() {
uni.request({
url: config.service.notReadNum,
method: "GET",
data: {
id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
projectId: uni.getStorageSync('buildingID').id,
},
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (res) => {
this.count = res.data.data || 0
}
})
},
// 跳转日报 // 跳转日报
goReception(data, index) { goReception(data, index) {
this.$store.commit('setMessageObj', data) this.$store.commit('setMessageObj', data)
data.readFlag = 1 data.readFlag = 1
if (data.messageType == 2) { if (data.messageType == 2) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/mine/reportExcel/weekReport?id=${data.id}`
url: `/pages/reportExcel/weekReport?id=${data.id}`
}) })
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/mine/reportExcel/dayReport?id=${data.id}`
url: `/pages/reportExcel/dayReport?id=${data.id}`
}) })
} }
}, },
fomatDate(date) {
if (!date) return '--'
let arr = date.split(' ')
let str = arr[0]
let result = str.split('-')
return `${result[1]}月${result[2]}日`
},
// 转换时间
getTimeLine(date, type = 1) {
let resu = '--'
if (!date) return resu
let time = new Date(date.replace(/-/g, '/'))
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
},
change(index) { change(index) {
this.current = index; this.current = index;
this.initPage() this.initPage()


pages/mine/reportExcel/dayReport.vue → pages/reportExcel/dayReport.vue View File

@@ -17,7 +17,6 @@
<view class="dateList"> <view class="dateList">
<!-- --> <!-- -->
<view class="arrs"> <view class="arrs">

<view class="arrs-items index1"> <view class="arrs-items index1">
<view class="left"> <view class="left">
1 1
@@ -29,15 +28,15 @@


<view class="r-box"> <view class="r-box">
<view class="r-box-item"> <view class="r-box-item">
<text>接待量</text><text>{{ weekObj.receptionCount || 0 }}</text>
<text>接待量</text><text class="value">{{ weekObj.receptionCount || 0 }}</text>
</view> </view>
<view class="r-box-item"> <view class="r-box-item">
<text>有效接待</text><text>{{ weekObj.activeCustomer || 0 }}</text>
<text>有效接待</text><text class="value">{{ weekObj.activeCustomer || 0 }}</text>
</view> </view>
<view class="r-box-item-lang"> <view class="r-box-item-lang">
<view>有效接待率<text>{{ weekObj.validReceptionRate || 0 }}%</text></view>
<view class="contrast">对比昨天<text
:class="{down: weekObj.validReceptionRatePK < 0, up: weekObj.validReceptionRatePK > 0}">{{ weekObj.validReceptionRatePK || 0 }}</text>
<view>有效接待率<text class="value">{{ weekObj.validReceptionRate || 0 }}%</text></view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.validReceptionRatePK < 0, up: weekObj.validReceptionRatePK > 0}">{{ weekObj.validReceptionRatePK > 0 ? '+' : '' }}{{ weekObj.validReceptionRatePK || 0 }}%</text>
</view> </view>
</view> </view>
</view> </view>
@@ -55,9 +54,9 @@
</view> </view>
<view class="r-box"> <view class="r-box">
<view class="r-box-item-lang"> <view class="r-box-item-lang">
<view>销讲执行率<text>{{ weekObj.fraction || 0 }}%</text></view>
<view class="contrast">对比昨天<text
:class="{down: weekObj.fractionPK < 0, up: weekObj.fractionPK > 0}">{{ weekObj.fractionPK || 0 }}</text>
<view>销讲执行率<text class="value">{{ weekObj.fraction || 0 }}%</text></view>
<view class="contrast">对比昨天<text class="value"
:class="{down: weekObj.fractionPK < 0, up: weekObj.fractionPK > 0}">{{ weekObj.fractionPK > 0 ? '+' : '' }}{{ weekObj.fractionPK || 0 }}%</text>
</view> </view>
</view> </view>
</view> </view>
@@ -74,9 +73,9 @@
</view> </view>
<view class="r-box"> <view class="r-box">
<view class="r-box-item-lang"> <view class="r-box-item-lang">
<view>平均接待时长<text>{{ weekObj.avgDuration || 0 }}min</text></view>
<view>平均接待时长<text class="value">{{ weekObj.avgDuration || 0 }}min</text></view>
<view class="contrast">对比昨天<text <view class="contrast">对比昨天<text
:class="{down: weekObj.avgDurationPK < 0, up: weekObj.avgDurationPK > 0}">{{ weekObj.avgDurationPK }}</text>
:class="{down: weekObj.avgDurationPK < 0, up: weekObj.avgDurationPK > 0}">{{ weekObj.avgDurationPK > 0 ? '+' : '' }}{{ weekObj.avgDurationPK }}min</text>
</view> </view>
</view> </view>
</view> </view>
@@ -194,7 +193,7 @@
{{ rank.title || '--' }} {{ rank.title || '--' }}
</view> </view>
<view class="rside"> <view class="rside">
({{ rank.value || 0 }}%)
({{ rank.value || 0 }}min)
</view> </view>
</view> </view>
</block> </block>
@@ -222,7 +221,7 @@
<view class="lside"> <view class="lside">
{{ rank.title || '--' }} {{ rank.title || '--' }}
</view> </view>
<view class="rside">
<view class="rside value">
{{ rank.value || 0 }}% {{ rank.value || 0 }}%
</view> </view>
</view> </view>
@@ -238,7 +237,7 @@
<view class="right"> <view class="right">
<view class="r-title"> <view class="r-title">
<text>客户画像触达:</text> <text>客户画像触达:</text>
<text class="num">{{ weekObj.reachSum || 0 }}次</text>
<text class="num value">{{ weekObj.reachSum || 0 }}次</text>
</view> </view>
</view> </view>
</view> </view>
@@ -250,8 +249,9 @@
<view class="right"> <view class="right">
<view class="r-title"> <view class="r-title">
<text>未标记接待数:</text> <text>未标记接待数:</text>
<text class="num up"
style="font-weight: 500;font-size: 34rpx;">{{ weekObj.unlabelledReceptionNum || 0 }}</text>条
<text class="num value down"
style="font-weight: 500;font-size: 34rpx;">{{ weekObj.unlabelledReceptionNum || 0 }}</text>
<text class="down">条</text>
</view> </view>
</view> </view>
</view> </view>
@@ -266,9 +266,9 @@
</view> </view>
<view class="r-box"> <view class="r-box">
<view class="r-box-item-lang"> <view class="r-box-item-lang">
<view>在线<text>{{ weekObj.equipmentInfo.onlineNum || 0 }}</text></view>
<view>在线<text class="value">{{ weekObj.equipmentInfo.onlineNum || 0 }}</text></view>
<view style="margin-left: 24rpx;"> <view style="margin-left: 24rpx;">
离线<text>{{ weekObj.equipmentInfo.offlineNum || 0 }}</text></view>
离线<text class="value">{{ weekObj.equipmentInfo.offlineNum || 0 }}</text></view>
</view> </view>
</view> </view>
</view> </view>
@@ -316,7 +316,7 @@
return { return {
title: `${this.projectName}数智工牌日报`, title: `${this.projectName}数智工牌日报`,
type: 2, type: 2,
path: `/pages/mine/reportExcel/dayReport?id=${this.id}`
path: `/pages/reportExcel/dayReport?id=${this.id}`
} }
}, },


@@ -437,7 +437,7 @@
.c-head-card { .c-head-card {
padding: 30rpx; padding: 30rpx;
width: 100%; width: 100%;
height: 252rpx;
min-height: 252rpx;
border: 2rpx solid #000000; border: 2rpx solid #000000;
border-radius: 12rpx; border-radius: 12rpx;
box-shadow: 10rpx 10rpx #2671E2; box-shadow: 10rpx 10rpx #2671E2;
@@ -479,6 +479,7 @@
.arrs-items { .arrs-items {
margin: 40rpx 0 0 0; margin: 40rpx 0 0 0;
display: flex; display: flex;
min-height: 100rpx;


.left { .left {
flex-shrink: 0; flex-shrink: 0;
@@ -585,11 +586,12 @@


.nav-footer { .nav-footer {
position: sticky; position: sticky;
bottom: 32rpx;
margin: 32rpx 0;
bottom: 0;
padding: 32rpx 0;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
background: #fff;


.footer-item { .footer-item {
width: 686rpx; width: 686rpx;
@@ -619,13 +621,23 @@
} }




.up {
color: #43CD80 !important;
}

.down {
color: #E6273A !important;
}

.empty { .empty {
width: 100%; width: 100%;
height: 240rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
line-height: 48rpx;
}
.value {
margin-left: 5rpx;
font-size: 30rpx;
font-weight: bold;
} }
} }
</style> </style>

pages/mine/reportExcel/weekReport.vue → pages/reportExcel/weekReport.vue View File

@@ -24,10 +24,10 @@
<view class="briefing-box"> <view class="briefing-box">
<block v-for="(data, index) in numlist" :key="index"> <block v-for="(data, index) in numlist" :key="index">
<view class="briefing-box-item"> <view class="briefing-box-item">
<view class="tops">
<view class="tops" :class="[data.class || '']">
{{ data.name }} {{ data.name }}
</view> </view>
<view class="middle">
<view class="middle" :class="[data.class || '']">
{{ data.num || 0 }} {{ data.num || 0 }}
</view> </view>
<view class="bottom"> <view class="bottom">
@@ -35,7 +35,8 @@
<text class="b-text" <text class="b-text"
:class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent || '0' }}</text> :class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent || '0' }}</text>
<template v-if="data.percent != 0"> <template v-if="data.percent != 0">
<text style="margin-left: 8rpx;font-size: 34rpx;font-weight: bold;" :class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent > 0 ? '↑' : '↓' }}</text>
<text style="margin-left: 8rpx;font-size: 34rpx;font-weight: bold;"
:class="{up: data.percent > 0, down: data.percent < 0}">{{ data.percent > 0 ? '↑' : '↓' }}</text>
</template> </template>
</view> </view>
</view> </view>
@@ -50,15 +51,21 @@
销讲场景执行排名 销讲场景执行排名
</view> </view>
<template v-if="isShowXJTop1List"> <template v-if="isShowXJTop1List">
<view class="execution-ranking-desc">
<view class="execution-ranking-desc" v-if="false">
<text>销讲场景平均执行对比上周</text> <text>销讲场景平均执行对比上周</text>
<text>{{ rankTop('fractionPKName') }}</text> <text>{{ rankTop('fractionPKName') }}</text>
<text>{{ rankTop('fractionPK') }}</text> <text>{{ rankTop('fractionPK') }}</text>
<text>%,其中【{{ rankTop('fractionBastName') }}】最强为</text>
<text class="up">{{ rankTop('fractionBastValue') }}</text>
<text>%,【{{ rankTop('fractionLastName') }}】执行最弱为</text>
<text class="down">{{ rankTop('fractionLastValue') }}</text>
<text>%;</text>
<text>%</text>
<template v-if="rankTop('fractionBastValue') > 0">
<text>,其中【{{ rankTop('fractionBastName') }}】最强为</text>
<text class="up">{{ rankTop('fractionBastValue') }}</text>
<text>%</text>
</template>
<template v-if="rankTop('fractionLastValue') < 0">
<text>,【{{ rankTop('fractionLastName') }}】执行最弱为</text>
<text class="down">{{ rankTop('fractionLastValue') }}</text>
<text>%;</text>
</template>
</view> </view>


<!-- 排名百分比列表 --> <!-- 排名百分比列表 -->
@@ -67,8 +74,9 @@
<view class="ranking-item"> <view class="ranking-item">
<view class="left">{{ percent.title }}</view> <view class="left">{{ percent.title }}</view>
<view class="middle"> <view class="middle">
<u-line-progress :active-color="$options.filters.setColor(percent.value)" inactive-color="#F2F2F2" :show-percent="false"
:percent="percent.value"></u-line-progress>
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress>
</view> </view>
<view class="right"> {{ percent.value || '0' }} %</view> <view class="right"> {{ percent.value || '0' }} %</view>
</view> </view>
@@ -87,8 +95,8 @@
<view class="statistics-title"> <view class="statistics-title">
接待统计 接待统计
</view> </view>
<template v-if="rankTop('ranktype')&&rankTop('people')&&weekObj.customerInfo1">
<view class="statistics-desc">
<template v-if="isShowStatistics">
<view class="statistics-desc" v-if="false">
<text> <text>
顾问平均执行率对比上周 顾问平均执行率对比上周
</text> </text>
@@ -99,11 +107,11 @@
<text class=""> <text class="">
人,其中{{ rankTop('topName') || '' }}上升 人,其中{{ rankTop('topName') || '' }}上升
</text> </text>
<text class="up">{{ rankTop('topPk') || '' }}</text>
<text class="up">{{ rankTop('topPk') || '0' }}</text>
<text class=""> <text class="">
%为最高,{{ rankTop('lastName') || '' }}下降 %为最高,{{ rankTop('lastName') || '' }}下降
</text> </text>
<text class="down">{{ rankTop('lastPk') || '' }}</text>
<text class="down">{{ rankTop('lastPk') || '0' }}</text>
<text class=""> <text class="">
%降幅最大。 %降幅最大。
</text> </text>
@@ -146,14 +154,14 @@
顾问销讲执行率排名(TOP10) 顾问销讲执行率排名(TOP10)
</view> </view>
<template v-if="isShowZXLTopList"> <template v-if="isShowZXLTopList">
<!-- 排名百分比列表 -->
<!-- 排名百分比列表 -->
<view class="ranking-box"> <view class="ranking-box">
<block v-for="(percent, index) in weekObj.ZXLTopList" :key="index"> <block v-for="(percent, index) in weekObj.ZXLTopList" :key="index">
<view class="ranking-item"> <view class="ranking-item">
<view class="left">{{ percent.title }}</view> <view class="left">{{ percent.title }}</view>
<view class="middle"> <view class="middle">
<u-line-progress :active-color="$options.filters.setColor(percent.value)" inactive-color="#F2F2F2" :show-percent="false"
:percent="percent.value">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress> </u-line-progress>
</view> </view>
<view class="right"> {{ percent.value || '0' }} %</view> <view class="right"> {{ percent.value || '0' }} %</view>
@@ -182,11 +190,11 @@
<view class="ranking-item"> <view class="ranking-item">
<view class="left">{{ percent.title }}</view> <view class="left">{{ percent.title }}</view>
<view class="middle"> <view class="middle">
<u-line-progress :active-color="$options.filters.setColor(percent.value)" inactive-color="#F2F2F2" :show-percent="false"
:percent="percent.value">
<u-line-progress :active-color="$options.filters.setColor(index)"
inactive-color="#F2F2F2" :show-percent="false" :percent="percent.value">
</u-line-progress> </u-line-progress>
</view> </view>
<view class="right"> {{ percent.value || '0' }} %</view>
<view class="right"> {{ percent.value || '0' }} </view>
</view> </view>
</block> </block>
</view> </view>
@@ -200,35 +208,13 @@
</view> </view>


<!-- 使用建议 --> <!-- 使用建议 -->
<view class="proposal" v-if="false">
<view class="proposal" v-if="weekObj.suggest">
<view class="proposal-title"> <view class="proposal-title">
使用建议 使用建议
</view> </view>
<!-- 建议的文字 --> <!-- 建议的文字 -->
<view class="proposal-box"> <view class="proposal-box">
<block v-for="(data, index) in 3" :key="index">
<view class="proposal-item">
<view class="lside">
{{ index+1 }}
</view>
<view class="rside">
<view class="rside-title">
执行率整体较低;
</view>

<view class="rside-box">
<view class="reason">
原因:整体平均执率低
</view>
<view class="advice">
建议: 1、精简话术(关键词、指标点);
2、对顾问进行话术培训。
</view>
</view>

</view>
</view>
</block>
<u-parse class="ql-editor" :content="weekObj.suggest" />
</view> </view>
</view> </view>


@@ -244,7 +230,12 @@
</template> </template>


<script> <script>
import uParse from '@/components/gaoyia-parse/parse.vue'
export default { export default {

components: {
uParse
},
data() { data() {
return { return {
tableHead: [{ tableHead: [{
@@ -327,6 +318,7 @@
percentName: 'prohibitedNumPK', percentName: 'prohibitedNumPK',
preNum: '', // 上周数量 preNum: '', // 上周数量
preNumName: 'prohibitedNum2', // preNumName: 'prohibitedNum2', //
class: 'down',
}, },
{ {
name: '客户画像触达 (次)', name: '客户画像触达 (次)',
@@ -354,6 +346,7 @@
percentName: 'unlabelledReceptionNumPK', percentName: 'unlabelledReceptionNumPK',
preNum: '', // 上周数量 preNum: '', // 上周数量
preNumName: 'unlabelledReceptionNum2', // preNumName: 'unlabelledReceptionNum2', //
class: 'down',
}, },
], ],


@@ -365,65 +358,76 @@




computed: { computed: {
// 排名最高与最低 // 排名最高与最低
rankTop() { rankTop() {
return name => { return name => {
let obj = {} let obj = {}
try { try {
if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) { 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)
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) { if (this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0) {
obj.topName = this.weekObj.customerInfo1[0].name obj.topName = this.weekObj.customerInfo1[0].name
obj.topPk = Math.abs(this.weekObj.customerInfo1[0].pk) 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)
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) { if (this.weekObj.customerInfo1.length && this.weekObj.customerInfo2.length) {
obj.class = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ? 'up' : 'down'
obj.class = (this.weekObj.customerInfo1.length - this.weekObj.customerInfo2.length) > 0 ?
'up' : 'down'
} }
if (this.weekObj.fractionPK) { if (this.weekObj.fractionPK) {
obj.fractionPKName = this.weekObj.fractionPK > 0 ? '上涨' : '下跌' obj.fractionPKName = this.weekObj.fractionPK > 0 ? '上涨' : '下跌'
obj.fractionPK = Math.abs(this.weekObj.fractionPK) obj.fractionPK = Math.abs(this.weekObj.fractionPK)
} }
if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) { if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) {
obj.fractionBastName = this.weekObj.XJTop1List[0].title obj.fractionBastName = this.weekObj.XJTop1List[0].title
obj.fractionBastValue = this.weekObj.XJTop1List[0].value obj.fractionBastValue = this.weekObj.XJTop1List[0].value
} }
if (this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0) { 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
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] || '' return obj[name] || ''
} catch(e) {
} catch (e) {
console.log(e) console.log(e)
return '' return ''
} }
} }
}, },
isShowXJTop1List () {
return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length
// 接待统计
isShowStatistics() {
// return this.rankTop('ranktype') && this.rankTop('class') && this.rankTop('people') && this.rankTop('topName') && this.rankTop('topPk') && this.rankTop('lastName') && this.rankTop('lastPk') && this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0
return this.weekObj.customerInfo1 && this.weekObj.customerInfo1.length > 0
}, },

isShowXJTop1List() {
// return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0 && this.rankTop('fractionPKName') && this.rankTop('fractionPK') && this.rankTop('fractionBastName') && this.rankTop('fractionBastValue') && this.rankTop('fractionLastName') && this.rankTop('fractionLastName') && this.rankTop('fractionLastValue')
return this.weekObj.XJTop1List && this.weekObj.XJTop1List.length > 0
},

isShowZXLTopList() { isShowZXLTopList() {
return this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0 return this.weekObj.ZXLTopList && this.weekObj.ZXLTopList.length > 0
}, },
isShowJDLTopList() { isShowJDLTopList() {
return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0 return this.weekObj.JDLTopList && this.weekObj.JDLTopList.length > 0
}, },
}, },


onLoad(option) { onLoad(option) {
@@ -436,7 +440,7 @@
return { return {
title: `${this.projectName}数智工牌周报`, title: `${this.projectName}数智工牌周报`,
type: 2, type: 2,
path: `/pages/mine/reportExcel/weekRepor?id=${this.id}`
path: `/pages/reportExcel/weekReport?id=${this.id}`
} }
}, },


@@ -454,7 +458,7 @@
this.bubbleSort(data.customerInfo2, 'pk') this.bubbleSort(data.customerInfo2, 'pk')
data.customerInfo1.reverse() data.customerInfo1.reverse()
data.customerInfo2.reverse() data.customerInfo2.reverse()
this.weekObj = { this.weekObj = {
...res.zkMessage, ...res.zkMessage,
...data ...data
@@ -479,8 +483,8 @@
}) })


}, },
// 把对象转成数组并在后续的步骤方便处理 // 把对象转成数组并在后续的步骤方便处理
init() { init() {
console.log(this.weekObj, 'this.weekObj') console.log(this.weekObj, 'this.weekObj')
@@ -533,21 +537,21 @@
} }
} }
}, },
// 转换时间 // 转换时间
getTimeLine(date, type = 1) { getTimeLine(date, type = 1) {
let resu = '--' let resu = '--'
if (!date) return resu if (!date) return resu
let time = new Date(date)
let time = new Date(date.replace(/-/g, '/'))
time.setDate(time.getDate() - 7) time.setDate(time.getDate() - 7)
let arr = date.split(' ') let arr = date.split(' ')
let str = arr[0] let str = arr[0]
let result = str.split('-') let result = str.split('-')
let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1) let m = (time.getMonth() + 1) < 10 ? `0${time.getMonth() + 1}` : (time.getMonth() + 1)
let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate() let d = time.getDate() < 10 ? `0${time.getDate()}` : time.getDate()
if (type == 1) { if (type == 1) {
resu = `${m}.${d}-${result[1]}.${result[2]}` resu = `${m}.${d}-${result[1]}.${result[2]}`
} else { } else {
@@ -570,7 +574,8 @@
// 转换时间 // 转换时间
getTimeLine(date, type = 1) { getTimeLine(date, type = 1) {
if (!date) return '--' if (!date) return '--'
let time = new Date(date)
console.log(date.replace(/-/g, '/'))
let time = new Date(date.replace(/-/g, '/'))
time.setDate(time.getDate() - 7) time.setDate(time.getDate() - 7)
let arr = date.split(' ') let arr = date.split(' ')
let str = arr[0] let str = arr[0]
@@ -585,22 +590,22 @@
return `${m}月${d}日~${result[1]}月${result[2]}日` return `${m}月${d}日~${result[1]}月${result[2]}日`
} }
}, },
// 设置颜色 // 设置颜色
setColor(value) {
setColor(index) {
let color = '' let color = ''
switch(true) {
case 0 <= value && value <= 70 :
color = '#4FC78F';
break;
case 70 < value && value <= 80 :
color = '#FFCC00';
switch (index) {
case 0:
color = '#E7483C';
break; break;
case 80 < value && value <= 90 :
case 1:
color = '#FF8C13'; color = '#FF8C13';
break; break;
case 90 < value && value <= 100 :
color = '#E7483C';
case 2:
color = '#FFCC00';
break;
default:
color = '#4FC78F';
break; break;
} }
return color return color
@@ -610,6 +615,10 @@
</script> </script>


<style lang="scss" scoped> <style lang="scss" scoped>
@import '@/static/css/quill/quill.core.css';
@import '@/static/css/quill/quill.snow.css';
@import '@/static/css/quill/quill.bubble.css';

.pages { .pages {
width: 100vw; width: 100vw;
min-height: 100vh; min-height: 100vh;
@@ -622,7 +631,7 @@
} }


.container { .container {
padding: 30rpx 30rpx 0;
padding: 30rpx 30rpx 40rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: #fff; background: #fff;
@@ -644,7 +653,7 @@
font-weight: bold; font-weight: bold;
color: #303030; color: #303030;
} }
.date { .date {
// position: absolute; // position: absolute;
// right: 0; // right: 0;
@@ -663,9 +672,8 @@




.briefing { .briefing {
margin: 40rpx 0 0 0;
background: #fff; background: #fff;
.briefing-title { .briefing-title {
padding: 0 30rpx; padding: 0 30rpx;
height: 90rpx; height: 90rpx;
@@ -830,7 +838,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.name { .name {
justify-content: flex-start; justify-content: flex-start;
overflow: hidden; overflow: hidden;
@@ -958,17 +966,18 @@
} }


} }
.nav-footer { .nav-footer {
position: sticky; position: sticky;
bottom: 32rpx;
margin: 32rpx 0;
bottom: 0;
padding: 32rpx 0;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
background: #fff;

.footer-item { .footer-item {
width: 686rpx; width: 686rpx;
height: 88rpx; height: 88rpx;
@@ -980,11 +989,11 @@
border-radius: 8rpx; border-radius: 8rpx;
overflow: hidden; overflow: hidden;
font-size: 32rpx; font-size: 32rpx;
&.full { &.full {
background: #2671E2; background: #2671E2;
color: #fff; color: #fff;
.fulls { .fulls {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -993,15 +1002,15 @@
} }
} }
} }
} }


.up { .up {
color: #E6273A;
color: #43CD80 !important;
} }


.down { .down {
color: #43CD80;
color: #E6273A !important;
} }


.empity { .empity {

Loading…
Cancel
Save