douzhuo 1 anno fa
parent
commit
92a7d31907
5 ha cambiato i file con 291 aggiunte e 98 eliminazioni
  1. +25
    -16
      pages/center/Piabodata/Theteamcompared.vue
  2. +154
    -59
      pages/center/Piabodata/TrendAnalysis.vue
  3. +97
    -14
      pages/center/consumer/consumerDetail.vue
  4. +13
    -7
      pages/center/records/index.vue
  5. +2
    -2
      pages/mine/equipmentLog.vue

+ 25
- 16
pages/center/Piabodata/Theteamcompared.vue Vedi File

@@ -161,20 +161,34 @@
<view class="title1" style="flex: 1;">销讲能力</view>

<view class="title2" style="flex-grow: 1;justify-content: flex-end;">
<view class="title2-che" @click="showTemplates=true" style="width: 220rpx;">
<!-- <view class="title2-che" @click="showTemplates=true" style="width: 220rpx;">
{{ showBeTexts }}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view> -->
<view class="title2-che" @click="goTeam" style="width: 170rpx;">团队
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
</view>

<view class="uchaserbox" v-if="chartData1">
<view class="uchaserbox" v-if="chartData1 && chartData1.series.length > 0">
<qiun-data-charts :opts="opts" type="radar" :chartData="chartData1" :canvas2d="true"
canvasId="wangxiaohuaerlingeryilingwuyib88" background="none" />
</view>
<view v-else style="width: 100%; height: 470rpx; display: flex; align-items: center">
<view style="width: 100%;background: #ffffff">
<view style="width: 100%; text-align: center">
<image style="width: 220rpx; height: 200rpx"
src="https://static.quhouse.com/zhikong_xcx_img/nodatalist.png" mode=""></image>
</view>
<view style="
text-align: center;
width: 100%;
margin-top: 20rpx;
color: #999999;
">暂无数据</view>
</view>
</view>
</view>
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<!-- 选择部门的选择框 -->
@@ -425,11 +439,11 @@
this.LOADING = true
this.getMarketingBusiness()
let that = this
uni.$on('update', function(data) {
uni.$on('update', (data) => {
// console.log(data)
that.deptids = data.arr.join(',')
this.deptids = data.arr.join(',')
// 获取销奖能力
that.getPowerList()
this.getPowerList()
})
// 获取项目id
this.houseId = uni.getStorageSync('buildingID').id;
@@ -705,12 +719,10 @@
marketingBusiness: this.marketingBusiness,
})
.then(res => {
console.log('我再此')
let result = res.result
this['newTeam' + index] = res.avg[0]
this['newAvg' + index] = res.avg[1]
if (idx == 0) {
console.log(idx, index, url, '打卡记录撒橘红颗粒大健康1 ')
// 当选择的是牌名时
// 处理数据
// 先处理牌名数据,需要进行判断全部还是单个
@@ -752,7 +764,6 @@
arr = this.dealData(arr)
this['newlisttabinfo' + index] = arr
} else {
console.log(3, '啥大上课了就可领取诶去玩害偶尔UI哦请勿诶哦')
// 当两个都选择的时候
result[0].map(item => {
let obj = {}
@@ -770,7 +781,6 @@
this['newlisttabinfo' + index] = arr
}
} else {
console.log(idx, index, url, '1231231231289123132UI哦23UI哦23UI哦1 ')
// 当选择趋势时
this['lineOptsect' + index] = {}
let allobj = {
@@ -796,7 +806,6 @@
}
// 当选择只有一个时
else if (this.staff1.value && !this.staff2.value) {
// console.log(2)
let obj = {}
obj.data = []
obj.name = result[0][0].deptName
@@ -817,7 +826,6 @@
allobj.series.push(obj)
}
} else {
// console.log(3)
// 当两个都选择的时候
let obj = {}
let obj1 = {}
@@ -835,7 +843,6 @@
allobj.series.push(obj)
allobj.series.push(obj1)
}
// console.log(allobj)
// return
// this.lineOptsect1=allobj
this['lineOptsect' + index] = allobj
@@ -854,11 +861,10 @@
timeType: this.lastEndDate ? null : this.activeTotal + '',
lastEndDate: this.lastEndDate,
lastStartDate: this.lastStartDate,
marketingBusiness: this.marketingBusinessId,
marketingBusiness: this.marketingBusiness,
})
.then(res => {
this.LOADING = false
// console.log(res)
// 处理数据
this.chartData1 = {
categories: [],
@@ -870,6 +876,7 @@
}
// 当选择全部时
if (!this.staff1.value && !this.staff2.value) {
console.log('!this.staff1.value && !this.staff2.value')
// let first=res.first
res.first.map((item, index) => {
let obj = {
@@ -884,9 +891,11 @@
})
allobj.series.push(obj)
})

}
// 当选择只有一个时
else if (this.staff1.value && !this.staff2.value) {
console.log('this.staff1.value && !this.staff2.value')
res.first.map((item, index) => {
let obj = {
name: item[0].deptName,
@@ -931,8 +940,8 @@
allobj.series.push(obj)
})
}
// console.log(allobj)
this.chartData1 = allobj
console.log(this.chartData1, 'this.chartData1')
this.$forceUpdate()
}).catch(e => {
this.LOADING = false


+ 154
- 59
pages/center/Piabodata/TrendAnalysis.vue Vedi File

@@ -1,6 +1,15 @@
<template>
<view>
<view class="timetabct">
<view class="boxtittabs">
<div class="items" @tap="screenShow = true">{{ showTimeText }}
<u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
</div>
<div class="items" @tap="showTemplate = true">{{ showBeText }}
<u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
</div>
</view>

<!-- <view class="timetabct">
<view class="timetabctview">
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0)">7天</view>
</view>
@@ -10,7 +19,7 @@
<view class="timetabctview">
<view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2)">30天</view>
</view>
</view>
</view> -->

<view class="timepick">
<view class="timepicktime">
@@ -86,12 +95,12 @@

<view class="chart">
<view style="display: flex;padding: 0 0 40rpx 0;justify-content: center;">
<view class="marketingBusiness">
<!-- <view class="marketingBusiness">
<view class="marketingBusinesstext" style="min-width: 50rpx;" @click="showMarketingBusiness = true">
{{ marketingBusinessText }}
<image class="righttochoose" src="../../../static/images/righttochoose.png" mode=""></image>
</view>
</view>
</view> -->
<view
style="display: flex;justify-content:center;padding-left: 30rpx;padding-right: 30rpx;margin-top: 0rpx;"
v-if="guwenshow&&lopanobj.name" @click="oninputtap()">
@@ -212,13 +221,36 @@
<u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
<newcalendar v-model="totalTimeShow2" :planNum='intervaltime' mode="date" @change="totalTimeChange2">
</newcalendar>
<!--
<u-select v-model="showMarketingBusiness" mode="single-column" :list="showMarketingList"
label-name="templateName" value-name="id" @confirm="selectMarketingBusiness"></u-select>
-->
<!-- 加载组件 -->
<u-loadings v-model="LOADING"></u-loadings>

<!-- 销讲业务 -->
<u-select :mask-close-able="false" label-name="templateName" value-name="id" v-model="showTemplate"
mode="single-column" :list="templateList" @cancel="templateCancel" @confirm="templateConfirm"></u-select>


<!-- 更多筛选 -->
<u-popup v-model="screenShow" mode="bottom" height="368">
<view class="screen">
<view class="timetabct">
<view class="timetabctview">
<view :class="{ activecllasscet: activeTotal == 0 }" @click="tabtimetap(0, '7天')">7天</view>
</view>
<view class="timetabctview">
<view :class="{ activecllasscet: activeTotal == 1 }" @click="tabtimetap(1, '15天')">15天</view>
</view>
<view class="timetabctview">
<view :class="{ activecllasscet: activeTotal == 2 }" @click="tabtimetap(2, '30天')">30天</view>
</view>
</view>
</view>
</u-popup>


</view>
</template>
<script>
@@ -342,10 +374,19 @@
},



marketingBusinessText: '请选择销讲业务',
showMarketingBusiness: false, // 展示可选择的销讲业务
showMarketingList: [], // 销讲业务列表
marketingBusiness: '', // 销讲业务
screenShow: false, // 时间筛选弹窗
showTimeText: '近七天', // 展示文字
showBeText: '全部业务', //
templateList: [], // 销讲业务
showTemplate: false, // 展示选择销讲业务弹窗
showTemplates: false, // 展示选择销讲业务弹窗
templateLists: [], // 销讲业务
marketingBusinessId: '', // 选择的业务id
};

},
@@ -390,19 +431,33 @@
},
methods: {

// 获取销讲业务模板
// 销讲业务方法
templateCancel() {
this.showTemplate = false;
},

// 确认选择销讲业务
templateConfirm(e) {
this.showTemplate = false;
this.marketingBusiness = e[0].value
this.showBeText = e[0].label
this.init()
},


// 获取销讲业务
getMarketingBusiness() {
this.$u.get("/customer/marketingBusiness", {
houseId: this.pamect.houseId
this.$u.get('/customer/marketingBusiness', {
houseId: uni.getStorageSync('buildingID').id,
}).then(res => {
console.log(res)
if (res) {
this.showMarketingList = res
this.showMarketingList.unshift({
templateName: '全部',
id: ''
})
}
this.templateLists = res.map(item => {
return item
})
this.templateList = res
this.templateList.unshift({
templateName: '全部业务',
id: ''
})
})
},

@@ -588,8 +643,11 @@


//时间切换
tabtimetap(index) {
tabtimetap(index, text) {
if (index == 0) {
this.screenShow = false
this.showTimeText = text
this.activeTotal = index;
this.pamect.timeType = "4";
this.pamect.firstStartDate = '';
this.pamect.firstEndDate = '';
@@ -597,6 +655,9 @@
this.pamect.lastEndDate = '';
this.init()
} else if (index == 1) {
this.screenShow = false
this.showTimeText = text
this.activeTotal = index;
this.pamect.timeType = "5";
this.pamect.firstStartDate = '';
this.pamect.firstEndDate = '';
@@ -604,6 +665,9 @@
this.pamect.lastEndDate = '';
this.init()
} else if (index == 2) {
this.screenShow = false
this.showTimeText = text
this.activeTotal = index;
this.pamect.timeType = "6";
this.pamect.firstStartDate = '';
this.pamect.firstEndDate = '';
@@ -627,20 +691,20 @@
},
//tab切换
tabxuanxiangtap(index) {
if (index == 1 || index == 3 || index == 4) {
if (this.showMarketingList.findIndex(item => item.id == '') != -1) {
this.showMarketingList.shift()
}
this.marketingBusinessText = this.showMarketingList[0].templateName
this.marketingBusiness = this.showMarketingList[0].id
} else {
this.showMarketingList.unshift({
templateName: '全部',
id: ''
})
this.marketingBusiness = ''
this.marketingBusinessText = '请选择销讲业务'
}
// if (index == 1 || index == 3 || index == 4) {
// if (this.showMarketingList.findIndex(item => item.id == '') != -1) {
// this.showMarketingList.shift()
// }
// this.marketingBusinessText = this.showMarketingList[0].templateName
// this.marketingBusiness = this.showMarketingList[0].id
// } else {
// this.showMarketingList.unshift({
// templateName: '全部',
// id: ''
// })
// this.marketingBusiness = ''
// this.marketingBusinessText = '请选择销讲业务'
// }
this.newactiveTotal = index;
this.guwenshow = false;
this.Selectlevel = false;
@@ -658,7 +722,9 @@
// this.activeTotal = 0;
this.timepickpickisshow = false;
this.init()

if (index == 4) {
this.Selectlevel = true
}
if (index == 1) {
this.guwenshow = true;
}
@@ -1226,6 +1292,32 @@
}
</script>
<style lang="scss" scoped>
.boxtittabs {
width: 100%;
height: 92rpx;
background: #FFFFFF;
display: flex;
align-items: center;

.items {
padding: 0 24rpx;
width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}

.boxtittabs {
position: sticky;
top: var(--window-top);
z-index: 999;
}

.boxtittab .tabbox {
flex: none;
padding: 0 35rpx;
@@ -1318,37 +1410,40 @@



.screen {

// 顶部时间切换
.timetabct {
// position: sticky;
// top: var(--window-top);
// z-index: 999;
// background: #fff;
width: 100%;
height: 98rpx;
display: flex;
border-bottom: 1rpx solid #E0E0E0;
color: #666;
flex-direction: column;
border: none;
}

// 顶部时间切换
.timetabct {
position: sticky;
top: var(--window-top);
z-index: 999;
background: #fff;
width: 100%;
height: 98rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #E0E0E0;
color: #666;
}
.timetabctview {
flex: 1;
text-align: center;
line-height: 98rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
height: 100%;
display: flex;
justify-content: center;
}

.timetabctview {
flex: 1;
text-align: center;
line-height: 98rpx;
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
height: 100%;
display: flex;
justify-content: center;
.timetabctview view {
width: 100rpx;
}
}

.timetabctview view {
width: 100rpx;
}

.activecllasscet {
color: #2671E2;


+ 97
- 14
pages/center/consumer/consumerDetail.vue Vedi File

@@ -133,7 +133,12 @@

<!-- 销讲执行率 -->
<view class="ratecenter" v-if="activeTotal==2">
<view class="ratetetle">执行总览</view>
<view class="boxtittabs">
<div class="items" @tap="showTemplate = true">销讲业务:{{ showBeText }}
<u-icon name="arrow-down" size="24" style="padding-left: 12rpx"></u-icon>
</div>
<div class="items">销讲执行:{{ totalRate||0 }}%</div>
</view>
<view class="rateyuanbox">
<view class="rateyuanboxzuo">
<view class="boxzuoview">{{customerInfo.visitRecord || '--'}}次</view>
@@ -318,7 +323,8 @@
<view class="hsnrtest">话术内容:</view>
<view v-if="subitem.modelList.length==0">暂无话术</view>
<view class="Level3che" v-for="(che, inc) in subitem.modelList" :key="inc">
<view class="title1" @click="clickWajue(che)" :style="che.isAskQuestions == 2 ? 'color:#FF8C13' : che.isAskQuestions == 0 ? '' : 'color: #666'">
<view class="title1" @click="clickWajue(che)"
:style="che.isAskQuestions == 2 ? 'color:#FF8C13' : che.isAskQuestions == 0 ? '' : 'color: #666'">
{{ inc + 1 }}.{{ che.showFormatExpression }}
</view>
<view class="jiantobox">
@@ -355,6 +361,13 @@

</u-popup>


<!-- 销讲业务 -->
<u-select :mask-close-able="false" label-name="templateName" value-name="cusId" v-model="showTemplate"
mode="single-column" :list="templateList" @cancel="templateCancel" @confirm="templateConfirm"></u-select>



<!-- 加载组件 -->
<u-loadings v-model="LOADING"></u-loadings>
</view>
@@ -380,7 +393,12 @@
fllowList: [],
userInfo: {},
buttonisshow: false,
isHavePermission: false
isHavePermission: false,


showBeText: '全部业务', //
templateList: [], // 销讲业务
showTemplate: false, // 展示选择销讲业务弹窗
}
},
onLoad(options) {
@@ -399,12 +417,39 @@
}
this.getCustomerInfo()
this.tabtimetap(0)
this.getMarketingBusiness()
let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
if (newmenulist.khgl_bj == true || newmenulist.khgl_gj == true) {
this.isHavePermission = true
}
},
methods: {
// 销讲业务方法
templateCancel() {
this.showTemplate = false;
},

// 确认选择销讲业务
templateConfirm(e) {
this.showTemplate = false;
this.customerId = e[0].value
this.showBeText = e[0].label
this.tabtimetap(2)
},


// 获取销讲业务
getMarketingBusiness() {
this.$u.get('/customer/marketingBusinessByCusId', {
id: this.customerId,
}).then(res => {
if (res) {
this.templateList = res
this.customerId = res[0].cusId
this.showBeText = res[0].templateName
}
})
},
clickWajue(item) {
if (item.isAskQuestions == 0) {
uni.navigateTo({
@@ -495,14 +540,20 @@
mask: true
});
if (_item.yon != 0) {
setTimeout(function() {
setTimeout(() => {
uni.hideLoading();
}, 2000);
uni.showToast({
icon: 'none',
title: '暂无录音',
duration: 2000
});
if (this.CHECKAUTHORITY('sbrz')) {
uni.navigateTo({
url: `/pages/mine/equipmentLog?id=${_item.id}`
})
} else {
uni.showToast({
icon: 'none',
title: '暂无录音',
duration: 2000
});
}
return
} else {
const parames = {
@@ -524,10 +575,16 @@
uni.hideLoading();
}, 2000);
if (res == null) {
uni.showToast({
icon: "none",
title: "暂无音频"
})
if (this.CHECKAUTHORITY('sbrz')) {
uni.navigateTo({
url: `/pages/mine/equipmentLog?id=${_item.id}`
})
} else {
uni.showToast({
icon: "none",
title: "暂无音频"
})
}
return
}
if (res[0].merge == 0) {
@@ -599,6 +656,7 @@
}).then(res => {
if (res.length) {
let level1 = []
let level2rate = 0
res.forEach(item => {
if (item.pid == 0) {
level1.push({
@@ -606,13 +664,18 @@
rate: item.fraction,
name: item.name,
sort: item.sort,
viewFlag: item.viewFlag,
show: false,
ratepercent: 0,
children: []
})
} else {
if (item.selected == 0) {
level2rate += item.fraction
}
}
})
// this.totalRate = level2rate;
this.totalRate = level2rate;
res.forEach(subitem => {
let subitempid = subitem.pid
level1.forEach(item => {
@@ -669,6 +732,26 @@
</script>

<style lang="scss" scoped>
.boxtittabs {
width: 100%;
height: 92rpx;
background: #FFFFFF;
display: flex;
align-items: center;

.items {
padding: 0 24rpx;
width: 50%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}

.rotatearrow {
transform: rotate(270deg);
}


+ 13
- 7
pages/center/records/index.vue Vedi File

@@ -623,7 +623,7 @@
mask: true
});
if (item.status == 0) {
setTimeout(function() {
setTimeout(() => {
uni.hideLoading();
}, 2000);
uni.showToast({
@@ -647,16 +647,22 @@
uni.setStorageSync("entrance", 1); //写入缓存
this.$u.post("/corpus/findByPage", parames).then(res => {
if (res == null) {
setTimeout(function() {
setTimeout(() => {
uni.hideLoading();
}, 2000);
uni.showToast({
icon: "none",
title: "暂无音频"
})
if (this.CHECKAUTHORITY('sbrz')) {
uni.navigateTo({
url: `/pages/mine/equipmentLog?id=${item.customerId}`
})
} else {
uni.showToast({
icon: "none",
title: "暂无音频"
})
}
return
} else {
setTimeout(function() {
setTimeout(() => {
uni.hideLoading();
}, 2000);
let newobj = res[0];


+ 2
- 2
pages/mine/equipmentLog.vue Vedi File

@@ -58,7 +58,7 @@
<text class="left">录音开始时间:</text>
<view class="right" style="font-weight: bold;font-size: 28rpx;">
<text :style="{color: info.recording==1?'red':'#333'}">
{{info.recordStartTime}}
{{info.recordStartTime || "--"}}
</text>
</view>
</view>
@@ -77,7 +77,7 @@
<text class="left">录音结束时间:</text>
<view class="right" style="font-weight: bold;font-size: 28rpx;">
<text :style="{color: info.recording==1?'red':'#333'}">
{{info.recordEndTime}}
{{info.recordEndTime || "--"}}
</text>
</view>
</view>


Caricamento…
Annulla
Salva