diff --git a/pages/center/records/index.vue b/pages/center/records/index.vue index dda1f8a..acfc3b2 100644 --- a/pages/center/records/index.vue +++ b/pages/center/records/index.vue @@ -457,15 +457,19 @@ onLoad(options) { this.LOADING = true this.isnorefresh = options.refresh; + if (options.activeTotal) { this.activeTotal = Number(options.activeTotal) } + if (options.markAdvisor) { - this.screen.markAdvisor = options.markAdvisor + this.screen.markAdvisor = Number(options.markAdvisor) } + if (options.validInvalid) { - this.screen.validInvalid = options.validInvalid + this.screen.validInvalid = Number(options.validInvalid) } + if (options.staTime) { this.staTime = options.staTime; this.endTime = options.endTime; diff --git a/pages/index/index.vue b/pages/index/index.vue index 99e5bf8..7c47f85 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -82,44 +82,35 @@ 实时统计 - - - + {{realtimeobj.receptionCount || 0}} 接待量 - + {{realtimeobj.activeCustomer|| 0}} 有效接待 - + {{realtimeobj.receivingCustomer || 0}} 正在接待 - + {{realtimeobj.tagCustomer || 0}} 未标顾问 - + {{realtimeobj.avgDuration|| 0}} 平均接待时长 - + {{realtimeobj.fraction || 0}}% 平均执行率 - + {{realtimeobj.wordFraction || 0}}% 平均挖掘率 @@ -135,32 +126,35 @@ 概览 - 近7天 - 近30天 - 自定义 + 近7天 + + + 近30天 + 自定义 + - + {{Thisweekobj.receptionCount || 0}} 接待量 - + {{Thisweekobj.activeCustomer|| 0}} 有效接待 - + {{Thisweekobj.fraction || 0}}% 平均执行率 - + {{Thisweekobj.avgDuration|| 0}} 平均接待时长 - + {{Thisweekobj.wordFraction || 0}}% 平均挖掘率 @@ -391,7 +385,7 @@ }, 3000) }, methods: { - towajue(){ + towajue() { uni.navigateTo({ url: "/pages/center/Piabodata/requireminingAnalysis" }) @@ -441,13 +435,13 @@ }, success: (res) => { let data = res.data.data - if(data){ - this.first(data.id) - this.content = data.content - this.tit = data.title - this.aid = data.accountId - this.id = data.id - this.isShowUpdate = data.readFlag == 0 ? true : false; + if (data) { + this.first(data.id) + this.content = data.content + this.tit = data.title + this.aid = data.accountId + this.id = data.id + this.isShowUpdate = data.readFlag == 0 ? true : false; } } }) @@ -646,6 +640,7 @@ } }) }, + //选择项目弹框 piskbuilding() { // this.Showhiddenunits = true; @@ -653,6 +648,7 @@ url: "../mine/selectBuilding" }) }, + // 项目选择确认 confirm(e) { this.buildingname = e[0].label; @@ -666,158 +662,102 @@ this.initrealTimeStatistics() this.initequipment() this.iniodianloang() - }, + // 项目选择取消 cancel() { this.Showhiddenunits = false; }, + + // 设备模块跳转 tapjumpequipment(i) { - this.Menulist.forEach(item => { - if (item.name == '设备管理') { - uni.navigateTo({ - url: '/pages/mine/equipment/index?active=' + i - }); - } - }) + if (this.checkAuthority('设备管理')) { + uni.navigateTo({ + url: '/pages/mine/equipment/index?active=' + i + }); + } }, + + // 违禁模块跳转 prohibitedtap(i) { + let str = '' if (i == 1) { - uni.navigateTo({ - url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '0' + - '&violatedStatus=1' - }); + str = '&activeTotal=0' } else { if (this.zhixingcenterindex == 2) { - uni.navigateTo({ - url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '2' + - '&violatedStatus=1' - }); + str = '&activeTotal=2' } else if (this.zhixingcenterindex == 6) { - uni.navigateTo({ - url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '3' + - '&violatedStatus=1' - }); + str = '&activeTotal=3' } else { - uni.navigateTo({ - url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '4' + - '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd + - '&violatedStatus=1' - }); + str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}` } } + uni.navigateTo({ + url: `/pages/center/prohibited/index?refresh=refresh&violatedStatus=1${str}` + }) }, - tapjumpreception(i) { - this.Menulist.forEach(item => { - if (item.name == '接待记录') { - if (i == 1) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + - '0' - }); - } else if (i == 'auth') { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + - '0' + '&validInvalid=0' - }); - } else if (i == 2) { - uni.switchTab({ - url: '/pages/index/customer' - }); - } else if (i == 3) { - if (this.zhixingcenterindex == 2) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '2' - }); - } else if (this.zhixingcenterindex == 6) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '3' - }); - } else { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '4' + '&staTime=' + this.statDateStart + - '&endtime=' + this.statDateEnd - }); - } - - } else if (i == 333) { - if (this.zhixingcenterindex == 2) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '2' + '&validInvalid=0' - }); - } else if (this.zhixingcenterindex == 6) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '3' + '&validInvalid=0' - }); - } else { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '4' + '&staTime=' + this.statDateStart + - '&endtime=' + this.statDateEnd + '&validInvalid=0' - }); - } - } else if (i == 3) { - if (this.zhixingcenterindex == 2) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '2' - }); - } else if (this.zhixingcenterindex == 6) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '3' - }); - } else { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '4' + '&staTime=' + this.statDateStart + - '&endtime=' + this.statDateEnd - }); - } + // 跳转正在接待页面 + switchJump() { + uni.switchTab({ + url: '/pages/index/customer' + }); + }, - } else if (i == 6) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + - '0' + '&validInvalid=0' - }); - } else if (i == 7) { - if (this.zhixingcenterindex == 2) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '2' + '&validInvalid=0' - }); - } else if (this.zhixingcenterindex == 6) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '3' + '&validInvalid=0' - }); - } else { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=' + '4' + '&staTime=' + this.statDateStart + - '&endtime=' + this.statDateEnd + '&validInvalid=0' - }); - } - } else if (i == 4) { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=0' + '&markAdvisor=0' + '&validInvalid=0' - }); + // 跳转参数 + checkParams(i) { + let str = '' + switch (i) { + case '1': + str = '&activeTotal=0'; + break; + case 'auth': + str = '&activeTotal=0&validInvalid=0' + break; + case '3': + // 筛选时间类型后传的参数 + if (this.zhixingcenterindex == 2) { + str = '&activeTotal=2' + } else if (this.zhixingcenterindex == 6) { + str = '&activeTotal=3' } else { - uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + - '&activeTotal=0' + '&markAdvisor=0' - }); + str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}` } - } - }) + break; + case '333': + case '7': + if (this.zhixingcenterindex == 2) { + str = '&activeTotal=2&validInvalid=0' + } else if (this.zhixingcenterindex == 6) { + str = '&activeTotal=3&validInvalid=0' + } else { + str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}&validInvalid=0` + } + break; + case '6': + str = '&activeTotal=0&validInvalid=0' + break; + case '4': + str = '&activeTotal=0&markAdvisor=0&validInvalid=0' + break; + default: + str = '&activeTotal=0&markAdvisor=0' + break; + } + return str + }, + + // 接待记录跳转 + tapjumpreception(params) { + // 校验是否有权限 + if (this.checkAuthority('接待记录')) { + uni.navigateTo({ + url: `/pages/center/records/index?refresh=refresh${params}` + }); + } }, + + // 权限菜单跳转 Piabodata(item) { if (item == '销讲数据') { uni.navigateTo({ @@ -825,7 +765,7 @@ }); } else if (item == '接待记录') { uni.navigateTo({ - url: '/pages/center/records/index?refresh=' + 'refresh' + url: '/pages/center/records/index?refresh=refresh' }); } else if (item == '值班顾问') { uni.navigateTo({ @@ -841,11 +781,11 @@ }); } else if (item == '违禁记录') { uni.navigateTo({ - url: '/pages/center/prohibited/index?refresh=' + 'refresh' + url: '/pages/center/prohibited/index?refresh=refresh' }); } else { uni.navigateTo({ - url: '/pages/center/consumer/index?refresh=' + 'refresh' + url: '/pages/center/consumer/index?refresh=refresh' }); } }, diff --git a/utils/domain.js b/utils/domain.js index d862ea4..c689739 100644 --- a/utils/domain.js +++ b/utils/domain.js @@ -1,5 +1,6 @@ // http.js使用域名 -const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试 +// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 测试服务器1 +const baseUrl = 'http://81.70.55.170:7070/api';// 测试服务器2 // const baseUrl = 'http://127.0.0.1:8080/autoSR/api'; // 本地 // const baseUrl = 'http://192.168.31.231:8080/autoSR/api'; // 长龙 // const baseUrl = 'http://192.168.31.149:8080/api'; // 盛浩