|
- <template>
- <view class="cented-box">
- <view class="Switchingbox">
- <view class="Switching1">
- <image class="Switching1-img" src="../../static/images/building.png" mode=""></image>
- </view>
- <view class="Switching2">{{ isPuqiang ? '项目' : '客户' }}:</view>
- <view class="Switching3">{{buildingname}}</view>
- <view class="Switching4" v-if="buildingishow" @click="piskbuilding()">切换项目</view>
- </view>
-
- <view class="title" style="margin-top: 30rpx;" v-if="Myworkcard">
- 我的工牌
- <template v-if="equipmentObj.imei">
- <text style="margin-left: 20rpx;">{{ equipmentObj.imei }}</text>
- </template>
- </view>
- <view v-if="Myworkcard">
- <view class="Workcard" v-if="Whetheroffline==true">
- <view class="Workcard-box">
- <view class="Workcardimg">
- <view class="Workcardimg1">
- <view v-if="percentage>20" class="bar" :style="{width : percentage + '%' }"></view>
- <view v-if="percentage<20" class="bar1" :style="{width : percentage + '%' }"></view>
- </view>
- </view>
- <view class="Workcardtext">电量:{{percentage}}%</view>
- </view>
- <view class="Workcard-box">
- <view class="Workcardimg">
- <image v-if="signalDevice==''" class="Workcardimg2" src="../../static/images/signal0.png"
- mode=""></image>
- <image v-else-if="signalDevice<20 && signalDevice>0" class="Workcardimg2"
- src="../../static/images/signal1.png" mode=""></image>
- <image v-else-if="signalDevice<50 && signalDevice>20" class="Workcardimg2"
- src="../../static/images/signal2.png" mode=""></image>
- <image v-else-if="signalDevice<70 && signalDevice>50" class="Workcardimg2"
- src="../../static/images/signal3.png" mode=""></image>
- <image v-else-if="signalDevice<90 && signalDevice>70" class="Workcardimg2"
- src="../../static/images/signal4.png" mode=""></image>
- <image v-else-if="signalDevice<=100 && signalDevice>90" class="Workcardimg2"
- src="../../static/images/signal5.png" mode=""></image>
- </view>
- <view class="Workcardtext">信号:{{signalDevicetext}}</view>
- </view>
- <view class="Workcard-box">
- <view class="Workcardimg">
- <image v-if="audioStatus=='true'" class="Workcardimg3"
- src="../../static/images/Thtapedrive1.png" mode=""></image>
- <image v-if="audioStatus=='false'" class="Workcardimg3"
- src="../../static/images/Thtapedrive2.png" mode=""></image>
- </view>
- <view v-if="audioStatus=='true'" class="Workcardtext">录音:已开启</view>
- <view v-if="audioStatus=='false'" class="Workcardtext">录音:未开启</view>
- </view>
- </view>
- <view class="Workcard" v-if="Whetheroffline==false">
- <view class="Workcard-box">
- <view class="Workcardimg">
- <image class="Workcardimg4" src="../../static/images/offline.png" mode=""></image>
- </view>
- <view class="Workcardtext">设备离线</view>
- </view>
- </view>
- </view>
-
- <!-- 临期项目提醒 -->
- <view class="endworking" v-if="bulidIngObj.daysRemaining <= 60"
- :class="{sixty: (bulidIngObj.daysRemaining > 15 && bulidIngObj.daysRemaining <= 60), fifteen: bulidIngObj.daysRemaining <= 15}">
- 您的服务于{{ bulidIngObj.endWorking }}到期,为了避免影响您的使用,请与服务商联系
- </view>
-
- <template v-if="checkAuthority('转写时长剩余')">
- <view class="title">转写消费</view>
- <view class="shebenbox">
- <view class="shebenche">
- <view class="shebenchenum">{{paraphraseObj.rechargeSum || 0}}</view>
- <view class="shebenchetext">购买小时</view>
- </view>
- <view class="shebenche">
- <view class="shebenchenum">{{paraphraseObj.presenterSum || 0}}</view>
- <view class="shebenchetext">赠送小时</view>
- </view>
- <view class="shebenche">
- <view class="shebenchenum">{{paraphraseObj.useSum || 0}}</view>
- <view class="shebenchetext">已用小时</view>
- </view>
- <view class="shebenche">
- <view class="shebenchenum" :style="paraphraseObj.surplusSum < 100 ? 'color: red' : ''">{{paraphraseObj.surplusSum || 0}}</view>
- <view class="shebenchetext">剩余小时</view>
- </view>
- </view>
- </template>
-
- <template v-if="equipmentisshow">
- <view class="title" >设备</view>
- <view class="shebenbox">
- <view class="shebenche" @click="tapjumpequipment(0)">
- <view class="shebenchenum">{{equipmentobj.totalNum || 0}}</view>
- <view class="shebenchetext">设备总数</view>
- </view>
- <view class="shebenche" @click="tapjumpequipment(1)">
- <view class="shebenchenum">{{equipmentobj.onlineNum || 0}}</view>
- <view class="shebenchetext">在线</view>
- </view>
- <view class="shebenche" @click="tapjumpequipment(3)">
- <view class="shebenchenum">{{equipmentobj.activeNum || 0}}</view>
- <view class="shebenchetext">活跃</view>
- </view>
- <view class="shebenche" @click="tapjumpequipment(2)">
- <view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum || 0}}</view>
- <view class="shebenchetext">急需充电</view>
- </view>
- </view>
- </template>
- <view class="title">实时统计</view>
- <view class="real-timebox">
- <view class="timebox">
- <view class="real" @click="tapjumpreception(checkParams('1'))">
- <view class="realnum">{{realtimeobj.receptionCount || 0}}</view>
- <view class="realtext">接待量</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('6'))">
- <view class="realnum">{{realtimeobj.activeCustomer|| 0}}</view>
- <view class="realtext">有效接待</view>
- </view>
- <view class="real" @click="switchJump">
- <view class="realnum">{{realtimeobj.receivingCustomer || 0}}</view>
- <view class="realtext">正在接待</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('4'))">
- <view class="realnum">{{realtimeobj.tagCustomer || 0}}</view>
- <view class="realtext">未标顾问</view>
- </view>
- </view>
- <view class="timebox">
- <view class="real" @click="tapjumpreception(checkParams('auth'))">
- <view class="realnum">{{realtimeobj.avgDuration|| 0}}</view>
- <view class="realtext">平均接待时长</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('auth'))">
- <view class="realnum">{{max100(realtimeobj.fraction)}}%</view>
- <view class="realtext">平均执行率</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('6'))">
- <view class="realnum">{{max100(realtimeobj.wordFinishFraction)}}%</view>
- <view class="realtext">平均挖掘率</view>
- </view>
- <view class="real">
- <view @click="prohibitedtap(1)" v-if="methodsisshow==true" class="realnum" style="color: red;">
- {{realtimeobj.prohibitedCustomer || 0}}
- </view>
- <view @click="prohibitedtap(1)" v-if="methodsisshow==true" class="realtext">违禁预警</view>
- </view>
- </view>
- </view>
-
- <view class="title" style="display: flex;">
- <view style="width: 55%;">概览</view>
- <view class="cet" style="display: flex;">
- <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 2 }" @click="tabtimeclick(2)">近7天
- </view>
- <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 6 }" @click="tabtimeclick(6)">
- 近30天</view>
- <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 7 }" @click="tabtimeclick(7)">自定义
- </view>
- </view>
- </view>
- <view class="real-timebox">
- <view class="timebox">
- <view class="real" @click="tapjumpreception(checkParams('3'))">
- <view class="realnum">{{Thisweekobj.receptionCount || 0}}</view>
- <view class="realtext">接待量</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('7'))">
- <view class="realnum">{{Thisweekobj.activeCustomer|| 0}}</view>
- <view class="realtext">有效接待</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('333'))">
- <view class="realnum">{{max100(Thisweekobj.fraction)}}%</view>
- <view class="realtext">平均执行率</view>
- </view>
- </view>
- <view class="timebox">
- <view class="real" @click="tapjumpreception(checkParams('333'))">
- <view class="realnum">{{Thisweekobj.avgDuration|| 0}}</view>
- <view class="realtext">平均接待时长</view>
- </view>
- <view class="real" @click="tapjumpreception(checkParams('333'))">
- <view class="realnum">{{max100(Thisweekobj.wordFinishFraction)}}%</view>
- <view class="realtext">平均挖掘率</view>
- </view>
- <view class="real" @click="prohibitedtap(2)" v-if="methodsisshow==true">
- <view class="realnum" style="color: red;">{{Thisweekobj.prohibitedCustomer || 0}}</view>
- <view class="realtext">违禁预警</view>
- </view>
- <view class="real" v-else>
- <view class="realnum"></view>
- <view class="realtext"></view>
- </view>
- </view>
- </view>
-
- <view class="title">常用功能</view>
- <view class="commonly-box">
- <!-- 权限菜单控制显隐 因为后台添加的按钮权限并不会在此返回所以需要手动添加 showMenu -->
- <view class="commonly" @click="Piabodata(item.name)" v-for="(item,index) in Menulist" :key="index"
- v-if="showMenu(item.name)">
- <view class="commonly-img">
- <image class="commonly-img1" :src="item.name | imgFilter" mode=""></image>
- </view>
- <view class="commonly-text">{{item.name}}</view>
- </view>
- </view>
-
- <!-- 项目切换 -->
- <view v-if="Showhiddenunits">
- <u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="lpanlist"
- @cancel="cancel" @confirm="confirm"></u-select>
- </view>
- <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
- <view class="update" v-if="isShowUpdate">
- <view class="updateBox">
- <view class="top">
- <image src="../../static/images/updateIcon.png"></image>
- </view>
- <view class="content">
- <view class="tit">{{tit}}</view>
- <u-parse class="ql-editor" :content="content" @preview="preview" @navigate="navigate" />
- <!-- <rich-text :nodes="content"></rich-text> -->
- </view>
- <view class="btn" @click="lookDetail">查看详情</view>
- <view class="close" @click="close">
- <u-icon name="close-circle" size="80" color="#FFFFFF"></u-icon>
- </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>
- </view>
- </template>
-
- <script>
- var config = require("../../config");
- import tabbarList from '@/utils/tabbar.js'
- import uParse from '../../components/gaoyia-parse/parse.vue'
- import loading from "@/components/loading/index.vue"
- export default {
- components: {
- uParse,
- loading
- },
-
- data() {
- return {
- modalShow: false,
- id: "",
- isShowUpdate: false,
- tit: "",
- content: "",
- tabbarList: tabbarList,
- current: 0,
- userInfo: {},
- Showhiddenunits: false,
- lpanlist: [], //项目列表
- buildingname: '', //项目名
- buildingID: '', //项目id
- buildingishow: false, //是否选择项目
- Myworkcard: false,
- percentage: '', //设备电量
- Whetheroffline: false, //是否离线
- signalDevice: 0, //信号
- signalDevicetext: "",
- audioStatus: false,
- equipmentisshow: false,
- equipmentobj: { // 统计设备状态
- totalNum: '',
- onlineNum: '',
- activeNum: '',
- lowPowerNum: '',
- },
- equipmentObj: {}, // 接口返回设备信息2
- Menulist: [],
- realtimeobj: {
- sumCustomer: '',
- receivingCustomer: '',
- activeCustomer: '',
- prohibitedCustomer: '',
- tagCustomer: '',
- fraction: '',
- wordFinishFraction: '',
- receptionCount: ''
- },
- Thisweekobj: {
- sumCustomer: '',
- receivingCustomer: '',
- activeCustomer: '',
- prohibitedCustomer: '',
- tagCustomer: '',
- fraction: '',
- wordFraction: '',
- wordFinishFraction: '',
- receptionCount: ''
- },
- methodsisshow: false,
- zhixingcenterindex: 2,
- totalTimeShow: false,
- statDateStart: '',
- statDateEnd: '',
- needShow: ['客户管理', '接待记录', '销讲数据', '设备管理', '值班顾问', '顾问排名', '违禁记录'], // 权限配置需要展示出来的功能入口
- paraphraseObj: {}, // 转写消费
- };
- },
-
- computed: {
- // 是否是普强小程序
- showMenu() {
- return name => {
- if (this.needShow.findIndex(item => item == name) != -1) {
- return true
- } else {
- return false
- }
- }
- },
- // 是否是普强小程序
- isPuqiang() {
- return config.service.host.indexOf('xitong.pachira.cn') == -1
- },
- },
-
- onLoad() {
- if (!this.isPuqiang) {
- uni.setNavigationBarTitle({
- title: 'AI营销辅助平台'
- })
- }
- this.initPopup()
-
- },
-
-
- onShow() {
- this.upDateBulidIngObj()
- this.LOADING = true
- this.getMenu()
-
- this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
- if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
- this.methodsisshow = false;
- } else {
- this.methodsisshow = true;
- }
- if (this.userInfo.zkProperties.length == 1) {
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.buildingname = uni.getStorageSync('buildingID').name;
- this.buildingishow = false;
- } else {
- this.buildingishow = true;
- this.buildingname = uni.getStorageSync('buildingID').name;
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.userInfo.zkProperties.forEach(item => {
- item.label = item.propertyName;
- item.value = item.id
- })
- this.lpanlist = this.userInfo.zkProperties
- }
- if (this.userInfo.dataCode == 6) {
- this.Myworkcard = true;
- this.equipmentisshow = false;
- this.iniodianloang()
- } else {
- this.equipmentisshow = true;
- this.Myworkcard = false;
- this.initequipment()
- }
- this.initworkThisWeek()
- this.initrealTimeStatistics()
- this.updateInit()
- this.findByHouseIdForRecharge()
- },
-
- onPullDownRefresh() {
- this.getMenu()
- this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
- if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
- this.methodsisshow = false;
- } else {
- this.methodsisshow = true;
- }
- if (this.userInfo.zkProperties.length == 1) {
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.buildingname = uni.getStorageSync('buildingID').name;
- this.buildingishow = false;
- } else {
- this.buildingishow = true;
- this.buildingname = uni.getStorageSync('buildingID').name;
- this.buildingID = uni.getStorageSync('buildingID').id;
- this.userInfo.zkProperties.forEach(item => {
- item.label = item.propertyName;
- item.value = item.id
- })
- this.lpanlist = this.userInfo.zkProperties
- }
- if (this.userInfo.dataCode == 6) {
- // this.Myworkcard = true;
- this.equipmentisshow = false;
- this.iniodianloang()
- } else {
- this.equipmentisshow = true;
- // this.Myworkcard = false;
- this.initequipment()
- // this.waitForOperation()
- }
- this.initworkThisWeek()
- this.initrealTimeStatistics()
- this.findByHouseIdForRecharge()
-
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 3000)
- },
- methods: {
- max100(num) {
- if (num > 100) {
- return 100
- } else if (!num) {
- return 0;
- } else {
- return num;
- }
- },
- towajue() {
- uni.navigateTo({
- url: "/pages/center/Piabodata/requireminingAnalysis"
- })
- },
- close() {
- this.isShowUpdate = false;
- },
- lookDetail() {
- let datas = {
- id: this.id,
- title: this.tit,
- content: this.content
- }
- this.$store.commit('setMessageObj', datas)
- uni.navigateTo({
- url: "../mine/messageDetail"
- })
- let data = {
- id: this.id,
- accountId: uni.getStorageSync('weapp_session_userInfo_data').accountId
- }
- uni.request({
- url: config.service.updateRead,
- method: "GET",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- data,
- success: (res) => {
- this.initPopup()
- }
- })
- this.isShowUpdate = false;
- },
- initPopup() {
- uni.request({
- url: config.service.updatePopup,
- method: "GET",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
-
- data: {
-
- },
- 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;
- }
- }
- })
- },
- first(id) {
- uni.request({
- url: config.service.firstShowPopup,
- method: "GET",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- data: {
- id
- },
- success: (res) => {}
- })
- },
- updateInit() {
- 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
- this.tabbarList[3].count = res.data.data || 0
- }
- })
- },
-
- //获取权限
- getMenu() {
- this.$u.get("/user/getMenu").then(data => {
- uni.setStorageSync("weapp_session_Menu_data", data)
- this.Menulist = uni.getStorageSync('weapp_session_Menu_data');
- let remind = uni.getStorageSync("remind");
- uni.setStorageSync("remind", 1);
- if (this.Menulist.length) {
- if (this.Menulist.findIndex(item => item.name == '今日接待弹框') != -1) {
- this.modalShow = remind == 0 ? true : false
- } else {
- this.modalShow = false
- }
- }
- })
- },
- //自定义时间
- totalTimeChange(e) {
- this.statDateStart = e.startDate;
- this.statDateEnd = e.endDate;
- this.zhixingcenterindex = 7;
- this.initworkThisWeek()
- },
- //时间选择
- tabtimeclick(i) {
- if (i == 7) {
- this.totalTimeShow = true;
- } else {
- this.zhixingcenterindex = i;
- this.initworkThisWeek()
- }
- },
- //获取概览数据
- initworkThisWeek() {
- uni.request({
- url: config.service.workThisWeek,
- method: "POST",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- data: {
- houseId: this.buildingID,
- dateType: this.zhixingcenterindex == 7 ? null : this.zhixingcenterindex,
- statDateStart: this.statDateStart,
- statDateEnd: this.statDateEnd
- },
- success: (data) => {
- if (data.data.data == null) {
- return
- } else {
- this.Thisweekobj = {
- sumCustomer: data.data.data.sumCustomer,
- receivingCustomer: data.data.data.receivingCustomer,
- activeCustomer: data.data.data.activeCustomer,
- prohibitedCustomer: data.data.data.prohibitedCustomer,
- 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
- }
- }
- }
- })
- },
- //实时统计
- initrealTimeStatistics() {
- uni.request({
- url: config.service.realTimeStatistics,
- method: "POST",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- data: {
- houseId: this.buildingID
- },
- success: (data) => {
- this.LOADING = false
- if (data.data.data == null) {
- return
- } else {
- this.realtimeobj = {
- 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 || 0,
- fraction: data.data.data.fraction || 0,
- wordFinishFraction: data.data.data.wordFinishFraction || 0,
- receptionCount: data.data.data.receptionCount || 0
- }
- }
- },
- fail: () => {
- this.LOADING = false
- }
- })
- },
-
- // 转写充值剩余
- findByHouseIdForRecharge() {
- this.$u.get(`/cusLvStatistics/findByHouseIdForRecharge?houseId=${this.buildingID}`).then(res => {
- console.log(res)
- if (res) {
- this.paraphraseObj = res.list
- }
- })
- },
-
- //设备
- initequipment() {
- uni.request({
- url: config.service.findEquipmentState,
- method: "POST",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- data: {
- propertyId: this.buildingID
- },
- success: (data) => {
- if (data.data.data == null) {
- return
- } else {
- this.equipmentobj = {
- totalNum: data.data.data.totalNum,
- onlineNum: data.data.data.onlineNum,
- activeNum: data.data.data.activeNum,
- lowPowerNum: data.data.data.lowPowerNum,
- }
- }
- }
- })
- },
- //我的工牌
- iniodianloang() {
- uni.request({
- url: config.service.findElectricity,
- method: "POST",
- header: {
- 'content-type': 'application/json',
- 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
- },
- data: {},
- success: (data) => {
- if (data.data.data == null) {
- return
- } else {
- if (data.data.data > 100) {
- this.percentage = 100;
- } else {
- this.equipmentObj = data.data.data
- if (data.data.data.onLine == 0) {
- this.Whetheroffline = false;
- } else {
- this.Whetheroffline = true;
- this.percentage = data.data.data.electricity;
- this.signalDevice = data.data.data.signalDevice / 1;
- console.log(this.signalDevice)
- this.audioStatus = data.data.data.audioStatus;
- if (this.signalDevice > 80) {
- this.signalDevicetext = '高';
- } else {
- if (this.signalDevice == 0) {
- this.signalDevicetext = '无';
- } else {
- this.signalDevicetext = '低';
- }
- }
- }
-
- }
- }
- }
- })
- },
-
- //选择项目弹框
- piskbuilding() {
- // this.Showhiddenunits = true;
- uni.navigateTo({
- url: "../mine/selectBuilding"
- })
- },
-
- // 项目选择确认
- confirm(e) {
- this.buildingname = e[0].label;
- this.buildingID = e[0].value;
- let lopan = {
- id: e[0].value,
- name: e[0].label
- }
- uni.setStorageSync("buildingID", lopan); //项目id写入缓存
- this.initworkThisWeek()
- this.initrealTimeStatistics()
- this.initequipment()
- this.iniodianloang()
- },
-
- // 项目选择取消
- cancel() {
- this.Showhiddenunits = false;
- },
-
- // 设备模块跳转
- tapjumpequipment(i) {
- if (this.checkAuthority('设备管理')) {
- uni.navigateTo({
- url: '/pages/mine/equipment/index?active=' + i
- });
- }
- },
-
- // 违禁模块跳转
- prohibitedtap(i) {
- let str = ''
- if (i == 1) {
- str = '&activeTotal=0'
- } else {
- if (this.zhixingcenterindex == 2) {
- str = '&activeTotal=2'
- } else if (this.zhixingcenterindex == 6) {
- str = '&activeTotal=3'
- } else {
- str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}`
- }
- }
- uni.navigateTo({
- url: `/pages/center/prohibited/index?refresh=refresh&violatedStatus=1${str}`
- })
- },
-
- // 跳转正在接待页面
- switchJump() {
- uni.switchTab({
- url: '/pages/index/customer'
- });
- },
-
- // 跳转参数
- 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 {
- 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({
- url: '/pages/center/Piabodata/index'
- });
- } else if (item == '接待记录') {
- uni.navigateTo({
- url: '/pages/center/records/index?refresh=refresh'
- });
- } else if (item == '值班顾问') {
- uni.navigateTo({
- url: '/pages/mine/consultanonduty/index'
- });
- } else if (item == '设备管理') {
- uni.navigateTo({
- url: '/pages/mine/equipment/index'
- });
- } else if (item == '顾问排名') {
- uni.navigateTo({
- url: '/pages/center/Piabodata/Employeesstatistics'
- });
- } else if (item == '违禁记录') {
- uni.navigateTo({
- url: '/pages/center/prohibited/index?refresh=refresh'
- });
- } else {
- uni.navigateTo({
- url: '/pages/center/consumer/index?refresh=refresh'
- });
- }
- },
- },
-
- filters: {
- imgFilter(type) {
- let path = ''
- switch (type) {
- case '客户管理':
- path = '../../static/images/function1.png'
- break
- case '接待记录':
- path = '../../static/images/function2.png'
- break
- case '销讲数据':
- path = '../../static/images/function4.png'
- break
- case '设备管理':
- path = '../../static/images/function5.png'
- break
- case '值班顾问':
- path = '../../static/images/function6.png'
- break
- case '顾问排名':
- path = '../../static/images/rankingguwen.png'
- break
- case '违禁记录':
- path = '../../static/images/prohibited.png'
- break
- }
- return path
- }
- }
-
- };
- </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%;
- background: rgba(0, 0, 0, 0.5);
- position: fixed;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- z-index: 9999;
-
- .updateBox {
- width: 80%;
- background: #FFFFFF;
- position: relative;
- left: 50%;
- margin-left: -40%;
- padding: 20rpx;
- border-radius: 10rpx;
- top: 140rpx;
-
- .top {
- width: 350rpx;
- height: 220rpx;
- margin: 0 auto;
-
- image {
- width: 100%;
- height: 100%;
- }
- }
-
- .btn {
- width: 510rpx;
- height: 88rpx;
- background: #2671E2;
- margin: 0 auto;
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 36rpx;
- border-radius: 8rpx;
- color: #FFFFFF;
- }
-
- .content {
- height: 268rpx;
- overflow-y: auto;
- margin: 46rpx 0;
- }
-
- .tit {
- font-size: 40rpx;
- text-align: center;
- font-weight: bold;
- }
-
- .close {
- position: absolute;
- bottom: -100rpx;
- left: 50%;
- margin-left: -50rpx;
- }
- }
- }
-
- .activecllasscet {
- font-size: 28rpx;
- font-weight: 400;
- color: #008ef2;
- }
-
- .cet {
- font-size: 28rpx;
- font-weight: 400;
- color: #333333;
-
- .cetview {
- margin-left: 20rpx;
- }
- }
-
- .cented-box {
- position: relative;
- padding: 30rpx 0;
- background: #F8F8F8;
- width: 100%;
- height: 100%;
- }
-
- .Switchingbox {
- padding: 0 30rpx;
- width: 100%;
- height: 44rpx;
- display: flex;
- align-items: center;
-
- .Switching1 {
- width: 44rpx;
- height: 44rpx;
-
- .Switching1-img {
- width: 44rpx;
- height: 44rpx;
- }
- }
-
- .Switching2 {
- margin-left: 12rpx;
- font-size: 32rpx;
- color: #303030;
- font-weight: 500;
- }
-
- .Switching3 {
- width: calc(100% - 280rpx);
- font-size: 32rpx;
- color: #303030;
- font-weight: 500;
- }
-
- .Switching4 {
- width: 112rpx;
- font-size: 28rpx;
- color: #303030;
- font-weight: 400;
- text-align: right;
- text-decoration: underline
- }
- }
-
- .Workcard {
- width: 100%;
- background: #FFFFFF;
- height: 154rpx;
- box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
- border-radius: 12rpx;
- display: flex;
-
- .Workcard-box {
- flex: 1;
- height: 100%;
-
- .Workcardimg {
- width: 100%;
- display: flex;
- justify-content: center;
- margin-top: 42rpx;
-
- .Workcardimg1 {
- width: 64rpx;
- height: 36rpx;
- background-image: url(../../static/images/battery.png);
- background-size: 100% 100%;
- padding: 8rpx;
-
- .bar {
- background-color: #43CD80;
- height: 100%;
- border-radius: 4rpx;
- }
-
- .bar1 {
- background-color: red;
- height: 100%;
- border-radius: 4rpx;
- }
- }
-
- .Workcardimg2 {
- width: 56rpx;
- height: 36rpx;
- }
-
- .Workcardimg3 {
- width: 34rpx;
- height: 36rpx;
- }
-
- .Workcardimg4 {
- width: 50rpx;
- height: 40rpx;
- }
- }
-
- .Workcardtext {
- width: 100%;
- text-align: center;
- font-size: 24rpx;
- font-weight: 400;
- color: #666666;
- margin-top: 20rpx;
- }
- }
- }
-
- .title {
- margin: 48rpx 0 24rpx;
- padding: 0 30rpx;
- width: 100%;
- font-size: 30rpx;
- font-weight: 600;
- color: #333333;
- }
-
- .shebenbox {
- margin: 0 auto;
- width: 690rpx;
- height: 156rpx;
- background: #FFFFFF;
- box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
- border-radius: 12rpx;
- display: flex;
-
- .shebenche {
- width: 25%;
- height: 100%;
-
- .shebenchenum {
- width: 100%;
- font-size: 36rpx;
- font-weight: 600;
- color: #333333;
- text-align: center;
- margin-top: 28rpx;
- }
-
- .shebenchetext {
- width: 100%;
- font-size: 24rpx;
- font-weight: 400;
- color: #666666;
- text-align: center;
- margin-top: 24rpx;
- }
- }
- }
-
- .real-timebox {
- margin: 0 auto;
- width: 690rpx;
- background: #FFFFFF;
- box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
- border-radius: 12rpx;
- padding-bottom: 36rpx;
-
- .timebox {
- width: 100%;
- display: flex;
-
- .real {
- flex: 1;
- height: 100%;
-
- .realnum {
- width: 100%;
- font-size: 36rpx;
- font-weight: 600;
- color: #333333;
- text-align: center;
- margin-top: 36rpx;
- }
-
- .realtext {
- width: 100%;
- font-size: 24rpx;
- font-weight: 400;
- color: #666666;
- text-align: center;
- margin-top: 24rpx;
- }
- }
- }
-
- }
-
- .commonly-box {
- margin: 0 auto;
- width: 690rpx;
- background: #FFFFFF;
- box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
- border-radius: 12rpx;
- display: flex;
- flex-wrap: wrap;
- padding-bottom: 36rpx;
-
- .commonly {
- width: 25%;
- margin-top: 36rpx;
-
- .commonly-img {
- width: 100%;
- height: 68rpx;
- text-align: center;
-
- .commonly-img1 {
- width: 68rpx;
- height: 68rpx;
- border-radius: 50%;
- }
- }
-
- .commonly-text {
- width: 100%;
- text-align: center;
- font-size: 24rpx;
- font-weight: 400;
- color: #333333;
- margin-top: 16rpx;
- }
- }
- }
-
- .endworking {
- margin-top: 20rpx;
- padding: 15rpx 30rpx;
- width: 100%;
- }
-
- .sixty {
- background-color: #FDFCDA;
- }
-
- .fifteen {
- background-color: #F9C8C8;
- color: #ff0000;
- }
- </style>
|