You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1077 lines
31 KiB

  1. <template>
  2. <view class="cented-box">
  3. <view class="Switchingbox">
  4. <view class="Switching1">
  5. <image class="Switching1-img" src="../../static/images/building.png" mode=""></image>
  6. </view>
  7. <view class="Switching2">楼盘:</view>
  8. <view class="Switching3">{{buildingname}}</view>
  9. <view class="Switching4" v-if="buildingishow" @click="piskbuilding()">切换楼盘</view>
  10. </view>
  11. <view class="title" style="margin-top: 30rpx; display: flex; justify-content: space-between;" v-if="permissions.myisshebei">
  12. <view class="">
  13. 我的工牌:{{imeiCode||'未绑定'}}
  14. </view>
  15. <view class="" style="color: #2671E2; font-weight: normal;">
  16. <!-- 接待中 -->
  17. {{openFlag=='start'?'接待中':''}}
  18. </view>
  19. </view>
  20. <view v-if="permissions.myisshebei">
  21. <view class="Workcard" v-if="Whetheroffline==true">
  22. <view class="Workcard-box">
  23. <view class="Workcardimg">
  24. <view class="Workcardimg1">
  25. <view v-if="percentage>20" class="bar" :style="{width : percentage + '%' }"></view>
  26. <view v-if="percentage<20" class="bar1" :style="{width : percentage + '%' }"></view>
  27. </view>
  28. </view>
  29. <view class="Workcardtext">电量:{{percentage}}%</view>
  30. </view>
  31. <view class="Workcard-box">
  32. <view class="Workcardimg">
  33. <image v-if="signalDevice==''" class="Workcardimg2" src="../../static/images/signal0.png"
  34. mode=""></image>
  35. <image v-else-if="signalDevice<20 && signalDevice>0" class="Workcardimg2"
  36. src="../../static/images/signal1.png" mode=""></image>
  37. <image v-else-if="signalDevice<50 && signalDevice>20" class="Workcardimg2"
  38. src="../../static/images/signal2.png" mode=""></image>
  39. <image v-else-if="signalDevice<70 && signalDevice>50" class="Workcardimg2"
  40. src="../../static/images/signal3.png" mode=""></image>
  41. <image v-else-if="signalDevice<90 && signalDevice>70" class="Workcardimg2"
  42. src="../../static/images/signal4.png" mode=""></image>
  43. <image v-else-if="signalDevice<=100 && signalDevice>90" class="Workcardimg2"
  44. src="../../static/images/signal5.png" mode=""></image>
  45. </view>
  46. <view class="Workcardtext">信号:{{signalDevicetext}}</view>
  47. </view>
  48. <view class="Workcard-box">
  49. <view class="Workcardimg">
  50. <image v-if="audioStatus=='true'" class="Workcardimg3"
  51. src="../../static/images/Thtapedrive1.png" mode=""></image>
  52. <image v-if="audioStatus=='false'" class="Workcardimg3"
  53. src="../../static/images/Thtapedrive2.png" mode=""></image>
  54. </view>
  55. <view v-if="audioStatus=='true'" class="Workcardtext">录音:已开启</view>
  56. <view v-if="audioStatus=='false'" class="Workcardtext">录音:未开启</view>
  57. </view>
  58. </view>
  59. <view class="Workcard" v-if="Whetheroffline==false">
  60. <view class="Workcard-box">
  61. <view class="Workcardimg">
  62. <image class="Workcardimg4" src="../../static/images/offline.png" mode=""></image>
  63. </view>
  64. <view class="Workcardtext">设备离线</view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="title" v-if="permissions.shebeinum">待处理</view>
  69. <view class="shebenbox" v-if="permissions.shebeinum" >
  70. <view class="shebenche" @click="tapjumpequipment(0)">
  71. <view class="shebenchenum">{{equipmentobj.totalNum || 0}}</view>
  72. <view class="shebenchetext">接待即将结束</view>
  73. </view>
  74. <view class="shebenche" @click="tapjumpequipment(1)">
  75. <view class="shebenchenum">{{equipmentobj.onlineNum || 0}}</view>
  76. <view class="shebenchetext">未标顾问</view>
  77. </view>
  78. <view class="shebenche" @click="tapjumpequipment(3)">
  79. <view class="shebenchenum">{{equipmentobj.activeNum || 0}}</view>
  80. <view class="shebenchetext">违禁提醒</view>
  81. </view>
  82. <view class="shebenche" @click="tapjumpequipment(2)">
  83. <view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum || 0}}</view>
  84. <view class="shebenchetext">低电工牌</view>
  85. </view>
  86. </view>
  87. <view class="title" v-if="permissions.shebeinum">设备总览</view>
  88. <view class="shebenbox" v-if="permissions.shebeinum" >
  89. <view class="shebenche" @click="tapjumpequipment(0)">
  90. <view class="shebenchenum">{{equipmentobj.totalNum || 0}}</view>
  91. <view class="shebenchetext">设备总数</view>
  92. </view>
  93. <view class="shebenche" @click="tapjumpequipment(1)">
  94. <view class="shebenchenum">{{equipmentobj.onlineNum || 0}}</view>
  95. <view class="shebenchetext">在线</view>
  96. </view>
  97. <view class="shebenche" @click="tapjumpequipment(3)">
  98. <view class="shebenchenum">{{equipmentobj.activeNum || 0}}</view>
  99. <view class="shebenchetext">活跃</view>
  100. </view>
  101. <view class="shebenche" @click="tapjumpequipment(2)">
  102. <view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum || 0}}</view>
  103. <view class="shebenchetext">急需充电</view>
  104. </view>
  105. </view>
  106. <view class="title" v-if="permissions.shishinum">今日工作</view>
  107. <view class="real-timebox" v-if="permissions.shishinum">
  108. <view class="timebox">
  109. <view class="real" @click="tapjumpreception('1')">
  110. <view class="realnum">{{realtimeobj.receptionCount || 0}}</view>
  111. <view class="realtext">接待量</view>
  112. </view>
  113. <view class="real" @click="tapjumpreception('2')">
  114. <view class="realnum">{{realtimeobj.receivingCustomer || 0}}</view>
  115. <view class="realtext">正在接待</view>
  116. </view>
  117. <view class="real" @click="tapjumpreception('6')">
  118. <view class="realnum">{{realtimeobj.activeCustomer|| 0}}</view>
  119. <view class="realtext">有效接待</view>
  120. </view>
  121. <view class="real" @click="tapjumpreception('1')">
  122. <view class="realnum">{{realtimeobj.fraction || 0}}%</view>
  123. <view class="realtext">平均执行率</view>
  124. </view>
  125. </view>
  126. <view class="timebox">
  127. <view class="real" @click="tapjumpreception('4')">
  128. <view class="realnum">{{realtimeobj.tagCustomer || 0}}</view>
  129. <view class="realtext">未标顾问</view>
  130. </view>
  131. <view class="real" @click="tapjumpreception('1')">
  132. <view class="realnum">{{realtimeobj.avgDuration|| 0}}</view>
  133. <view class="realtext">平均接待时长</view>
  134. </view>
  135. <view class="real">
  136. <view @click="prohibitedtap(1)" v-if="methodsisshow==true" class="realnum" style="color: red;">
  137. {{realtimeobj.prohibitedCustomer || 0}}</view>
  138. <view @click="prohibitedtap(1)" v-if="methodsisshow==true" class="realtext">违禁预警</view>
  139. </view>
  140. <view class="real">
  141. <view class="realnum"></view>
  142. <view class="realtext"></view>
  143. </view>
  144. </view>
  145. </view>
  146. <view class="title" v-if="permissions.jileinum" style="display: flex;">
  147. <view style="width: 70%;" @click="taptimeisshow">
  148. <!-- 概览 -->
  149. {{choiceIndex}}累计<u-icon name="arrow-down" size="24" style="padding-left: 12rpx;"></u-icon>
  150. </view>
  151. <!-- <view class="cet" style="display: flex;">
  152. <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 2 }" @click="tabtimeclick(2)">近7天
  153. </view>
  154. <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 6 }" @click="tabtimeclick(6)">
  155. 近30天</view>
  156. <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 7 }" @click="tabtimeclick(7)">自定义
  157. </view>
  158. </view> -->
  159. </view>
  160. <view class="real-timebox" v-if="permissions.jileinum">
  161. <view class="timebox">
  162. <view class="real" @click="tapjumpreception('3')">
  163. <view class="realnum">{{Thisweekobj.receptionCount || 0}}</view>
  164. <view class="realtext">接待量</view>
  165. </view>
  166. <view class="real" @click="tapjumpreception('7')">
  167. <view class="realnum">{{Thisweekobj.activeCustomer|| 0}}</view>
  168. <view class="realtext">有效接待</view>
  169. </view>
  170. <view class="real" @click="tapjumpreception('3')">
  171. <view class="realnum">{{Thisweekobj.fraction || 0}}%</view>
  172. <view class="realtext">平均执行率</view>
  173. </view>
  174. </view>
  175. <view class="timebox">
  176. <view class="real" @click="tapjumpreception('3')">
  177. <view class="realnum">{{Thisweekobj.avgDuration|| 0}}</view>
  178. <view class="realtext">平均接待时长</view>
  179. </view>
  180. <view class="real" @click="prohibitedtap(2)" v-if="methodsisshow==true">
  181. <view class="realnum" style="color: red;">{{Thisweekobj.prohibitedCustomer || 0}}</view>
  182. <view class="realtext">违禁预警</view>
  183. </view>
  184. <view class="real" v-else>
  185. <view class="realnum"></view>
  186. <view class="realtext"></view>
  187. </view>
  188. <view class="real">
  189. <view class="realnum"></view>
  190. <view class="realtext"></view>
  191. </view>
  192. </view>
  193. </view>
  194. <view class="title">常用功能</view>
  195. <view class="commonly-box">
  196. <!-- <view class="commonly" @click="Piabodata('客户管理')" v-if="permissions.commonly1">
  197. <view class="commonly-img">
  198. <image class="commonly-img1" src="../../static/images/function1.png" mode=""></image>
  199. </view>
  200. <view class="commonly-text">客户管理</view>
  201. </view> -->
  202. <view class="commonly" @click="Piabodata('接待记录')" v-if="permissions.commonly2">
  203. <view class="commonly-img">
  204. <image class="commonly-img1" src="../../static/images/function2.png" mode=""></image>
  205. </view>
  206. <view class="commonly-text">接待记录</view>
  207. </view>
  208. <view class="commonly" @click="Piabodata('违禁记录')" v-if="permissions.commonly3">
  209. <view class="commonly-img">
  210. <image class="commonly-img1" src="../../static/images/prohibited.png" mode=""></image>
  211. </view>
  212. <view class="commonly-text">违禁记录</view>
  213. </view>
  214. <view class="commonly" @click="Piabodata('销讲分析')" v-if="permissions.commonly4">
  215. <view class="commonly-img">
  216. <image class="commonly-img1" src="../../static/images/function4.png" mode=""></image>
  217. </view>
  218. <view class="commonly-text">销讲分析</view>
  219. </view>
  220. <view class="commonly" @click="Piabodata('设备管理')" v-if="permissions.commonly5">
  221. <view class="commonly-img">
  222. <image class="commonly-img1" src="../../static/images/function5.png" mode=""></image>
  223. </view>
  224. <view class="commonly-text">设备管理</view>
  225. </view>
  226. <view class="commonly" @click="Piabodata('值班顾问')" v-if="permissions.commonly6">
  227. <view class="commonly-img">
  228. <image class="commonly-img1" src="../../static/images/function6.png" mode=""></image>
  229. </view>
  230. <view class="commonly-text">值班顾问</view>
  231. </view>
  232. <view class="commonly" @click="Piabodata('顾问排名')" v-if="permissions.commonly7">
  233. <view class="commonly-img">
  234. <image class="commonly-img1" src="../../static/images/rankingguwen.png" mode=""></image>
  235. </view>
  236. <view class="commonly-text">顾问排名</view>
  237. </view>
  238. <view class="commonly" @click="toTrendAnalysis()" v-if="permissions.commonly8">
  239. <view class="commonly-img">
  240. <image class="commonly-img1" src="../../static/images/qushi.png" mode=""></image>
  241. </view>
  242. <view class="commonly-text">销讲趋势</view>
  243. </view>
  244. <view class="commonly" @click="toStaffAnalysis()" v-if="permissions.commonly9">
  245. <view class="commonly-img">
  246. <image class="commonly-img1" src="../../static/images/yuangong.png" mode=""></image>
  247. </view>
  248. <view class="commonly-text">员工分析</view>
  249. </view>
  250. <view class="commonly" @click="toUserinsightinto()" v-if="permissions.commonly10">
  251. <view class="commonly-img">
  252. <image class="commonly-img1" src="../../static/images/yinghu.png" mode=""></image>
  253. </view>
  254. <view class="commonly-text">用户画像</view>
  255. </view>
  256. <view class="commonly" @click="Theteamcompared()" v-if="permissions.commonly11">
  257. <view class="commonly-img">
  258. <image class="commonly-img1" src="../../static/images/tuandui.png" mode=""></image>
  259. </view>
  260. <view class="commonly-text">团队对比</view>
  261. </view>
  262. <view class="commonly" @click="Groupcontrast()" v-if="permissions.commonly12">
  263. <view class="commonly-img">
  264. <image class="commonly-img1" src="../../static/images/jituan.png" mode=""></image>
  265. </view>
  266. <view class="commonly-text">集团对比</view>
  267. </view>
  268. </view>
  269. <!-- 楼盘切换 -->
  270. <view v-if="Showhiddenunits">
  271. <u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="lpanlist"
  272. @cancel="cancel" @confirm="confirm"></u-select>
  273. </view>
  274. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  275. <u-popup v-model="timeshow" mode="bottom">
  276. <view class="timeview" :style="{ color: zhixingcenterindex == 2 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(2,'近7天')">近7天</view>
  277. <view class="timeview" :style="{ color: zhixingcenterindex == 6 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(6,'近30天')">近30天</view>
  278. <view class="timeview" :style="{ color: zhixingcenterindex == 7 ? '#2B6EFF' : '#333333' }" @click="tabtimetap(7,'自定义')">自定义</view>
  279. </u-popup>
  280. <!-- 底部导航栏 -->
  281. <u-tabbar :mid-button="true" activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
  282. </view>
  283. </template>
  284. <script>
  285. var config = require("../../config");
  286. import tabbarList from '@/utils/tabbar.js'
  287. export default {
  288. data() {
  289. return {
  290. // tabbar配置项
  291. current: 2,
  292. tabbarList: tabbarList,
  293. //--- end --- tabbar配置项
  294. userInfo: {},
  295. Showhiddenunits: false,
  296. lpanlist: [], //楼盘列表
  297. buildingname: '', //楼盘名
  298. buildingID: '', //楼盘id
  299. buildingishow: false, //是否选择楼盘
  300. // Myworkcard: false,
  301. percentage: '', //设备电量
  302. Whetheroffline: false, //是否离线
  303. signalDevice: 0, //信号
  304. signalDevicetext: "",
  305. imeiCode:'',//设备号
  306. openFlag:'',//接待是否
  307. choiceIndex:'近7天',
  308. audioStatus: false,
  309. equipmentisshow: false,
  310. timeshow:false,
  311. equipmentobj: {
  312. totalNum: '',
  313. onlineNum: '',
  314. activeNum: '',
  315. lowPowerNum: '',
  316. },
  317. Menulist: [],
  318. realtimeobj: {
  319. sumCustomer: '',
  320. receivingCustomer: '',
  321. activeCustomer: '',
  322. prohibitedCustomer: '',
  323. tagCustomer: '',
  324. fraction: '',
  325. receptionCount: ''
  326. },
  327. Thisweekobj: {
  328. sumCustomer: '',
  329. receivingCustomer: '',
  330. activeCustomer: '',
  331. prohibitedCustomer: '',
  332. tagCustomer: '',
  333. fraction: '',
  334. receptionCount: ''
  335. },
  336. methodsisshow: false,
  337. zhixingcenterindex: 2,
  338. totalTimeShow: false,
  339. statDateStart: '',
  340. statDateEnd: '',
  341. permissions: {
  342. commonly1: false,
  343. commonly2: false,
  344. commonly3: false,
  345. commonly4: false,
  346. commonly5: false,
  347. commonly6: false,
  348. commonly7: false,
  349. myisshebei: false,
  350. shebeinum: false,
  351. shishinum: false,
  352. jileinum: false
  353. },
  354. // 标记顾问 bjgw
  355. // 接待无效标记 jdwxbj
  356. // 设为优秀案例 swyxal
  357. // 常错词 ccc
  358. // 校准 xz
  359. // 查看违禁执行 ckwjzx
  360. };
  361. },
  362. components: {},
  363. onShow() {
  364. this.getMenu()
  365. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  366. if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
  367. this.methodsisshow = false;
  368. } else {
  369. this.methodsisshow = true;
  370. }
  371. if (this.userInfo.zkProperties.length == 1) {
  372. this.buildingID = uni.getStorageSync('buildingID').id;
  373. this.buildingname = uni.getStorageSync('buildingID').name;
  374. this.buildingishow = false;
  375. } else {
  376. this.buildingishow = true;
  377. this.buildingname = uni.getStorageSync('buildingID').name;
  378. this.buildingID = uni.getStorageSync('buildingID').id;
  379. this.userInfo.zkProperties.forEach(item => {
  380. item.label = item.propertyName;
  381. item.value = item.id
  382. })
  383. this.lpanlist = this.userInfo.zkProperties
  384. }
  385. if (this.userInfo.dataCode == 6) {
  386. // this.Myworkcard = true;
  387. this.equipmentisshow = false;
  388. this.iniodianloang()
  389. } else {
  390. this.equipmentisshow = true;
  391. // this.Myworkcard = false;
  392. this.initequipment()
  393. }
  394. this.initworkThisWeek()
  395. this.initrealTimeStatistics()
  396. },
  397. methods: {
  398. //时间选择
  399. tabtimetap(index,str){
  400. this.timeshow=false;
  401. if (index == 7) {
  402. this.totalTimeShow = true;
  403. } else {
  404. this.choiceIndex=str
  405. this.zhixingcenterindex = index;
  406. this.initworkThisWeek()
  407. }
  408. },
  409. taptimeisshow(){
  410. this.timeshow=true;
  411. },
  412. //获取权限
  413. getMenu() {
  414. uni.request({
  415. url: config.service.getMenu,
  416. method: "POST",
  417. header: {
  418. 'content-type': 'application/json',
  419. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  420. },
  421. success: (data) => {
  422. let rescor = data.data;
  423. if (rescor.code == 0) {
  424. uni.setStorageSync("weapp_session_Menu_data", rescor.data)
  425. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  426. this.permissions.commonly1 = newmenulist.khgl;
  427. this.permissions.commonly2 = newmenulist.jdjl;
  428. this.permissions.commonly3 = newmenulist.wjjl;
  429. this.permissions.commonly4 = newmenulist.xjfx;
  430. this.permissions.commonly5 = newmenulist.sbgl;
  431. this.permissions.commonly6 = newmenulist.zbgw;
  432. this.permissions.commonly7 = newmenulist.gwpm;
  433. this.permissions.commonly8=newmenulist.lpdb;
  434. this.permissions.commonly9=newmenulist.xjqs;
  435. this.permissions.commonly10=newmenulist.tddb;
  436. this.permissions.commonly11=newmenulist.gwnl;
  437. this.permissions.commonly12=newmenulist.yhhx;
  438. this.permissions.myisshebei = newmenulist.wdsb;
  439. this.permissions.shebeinum = newmenulist.sbtj;
  440. this.permissions.shishinum = newmenulist.sstj;
  441. this.permissions.jileinum = newmenulist.gzlj;
  442. }
  443. }
  444. })
  445. },
  446. //自定义时间
  447. totalTimeChange(e) {
  448. this.statDateStart = e.startDate;
  449. this.statDateEnd = e.endDate;
  450. this.choiceIndex=e.startDate+'-'+e.endDate
  451. this.zhixingcenterindex = 7;
  452. this.initworkThisWeek()
  453. },
  454. tabtimeclick(i) {
  455. if (i == 7) {
  456. this.totalTimeShow = true;
  457. } else {
  458. this.zhixingcenterindex = i;
  459. this.initworkThisWeek()
  460. }
  461. },
  462. initworkThisWeek() {
  463. uni.request({
  464. url: config.service.workThisWeek,
  465. method: "POST",
  466. header: {
  467. 'content-type': 'application/json',
  468. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  469. },
  470. data: {
  471. houseId: this.buildingID,
  472. dateType: this.zhixingcenterindex == 7 ? null : this.zhixingcenterindex,
  473. statDateStart: this.statDateStart,
  474. statDateEnd: this.statDateEnd
  475. },
  476. success: (data) => {
  477. if (data.data.data == null) {
  478. return
  479. } else {
  480. this.Thisweekobj = {
  481. sumCustomer: data.data.data.sumCustomer,
  482. receivingCustomer: data.data.data.receivingCustomer,
  483. activeCustomer: data.data.data.activeCustomer,
  484. prohibitedCustomer: data.data.data.prohibitedCustomer,
  485. avgDuration: data.data.data.avgDuration || 0,
  486. tagCustomer: data.data.data.tagCustomer,
  487. fraction: data.data.data.fraction,
  488. receptionCount: data.data.data.receptionCount
  489. }
  490. }
  491. }
  492. })
  493. },
  494. //实时统计
  495. initrealTimeStatistics() {
  496. uni.request({
  497. url: config.service.realTimeStatistics,
  498. method: "POST",
  499. header: {
  500. 'content-type': 'application/json',
  501. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  502. },
  503. data: {
  504. houseId: this.buildingID
  505. },
  506. success: (data) => {
  507. if (data.data.data == null) {
  508. return
  509. } else {
  510. this.realtimeobj = {
  511. sumCustomer: data.data.data.sumCustomer,
  512. receivingCustomer: data.data.data.receivingCustomer,
  513. activeCustomer: data.data.data.activeCustomer,
  514. prohibitedCustomer: data.data.data.prohibitedCustomer,
  515. avgDuration: data.data.data.avgDuration || 0,
  516. tagCustomer: data.data.data.tagCustomer,
  517. fraction: data.data.data.fraction,
  518. receptionCount: data.data.data.receptionCount
  519. }
  520. }
  521. }
  522. })
  523. },
  524. //设备
  525. initequipment() {
  526. uni.request({
  527. url: config.service.findEquipmentState,
  528. method: "POST",
  529. header: {
  530. 'content-type': 'application/json',
  531. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  532. },
  533. data: {
  534. propertyId: this.buildingID
  535. },
  536. success: (data) => {
  537. if (data.data.data == null) {
  538. return
  539. } else {
  540. this.equipmentobj = {
  541. totalNum: data.data.data.totalNum,
  542. onlineNum: data.data.data.onlineNum,
  543. activeNum: data.data.data.activeNum,
  544. lowPowerNum: data.data.data.lowPowerNum,
  545. }
  546. }
  547. }
  548. })
  549. },
  550. //我的工牌
  551. iniodianloang() {
  552. uni.request({
  553. url: config.service.findElectricity,
  554. method: "POST",
  555. header: {
  556. 'content-type': 'application/json',
  557. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  558. },
  559. data: {
  560. propertyId: this.buildingID,
  561. accPhone: this.userInfo.username
  562. },
  563. success: (data) => {
  564. if (data.data.data == null) {
  565. return
  566. } else {
  567. this.imeiCode=data.data.data.imei
  568. this.openFlag=data.data.data.recCmd
  569. if (data.data.data > 100) {
  570. this.percentage = 100;
  571. } else {
  572. if (data.data.data.onLine == 0) {
  573. this.Whetheroffline = false;
  574. } else {
  575. this.Whetheroffline = true;
  576. this.percentage = data.data.data.electricity;
  577. this.signalDevice = data.data.data.signalDevice / 1;
  578. console.log(this.signalDevice)
  579. this.audioStatus = data.data.data.simAudioStatus;
  580. if (this.signalDevice > 80) {
  581. this.signalDevicetext = '高';
  582. } else {
  583. if (this.signalDevice == 0) {
  584. this.signalDevicetext = '无';
  585. } else {
  586. this.signalDevicetext = '低';
  587. }
  588. }
  589. }
  590. }
  591. }
  592. }
  593. })
  594. },
  595. //选择楼盘弹框
  596. piskbuilding() {
  597. this.Showhiddenunits = true;
  598. },
  599. // 楼盘选择确认
  600. confirm(e) {
  601. this.buildingname = e[0].label;
  602. this.buildingID = e[0].value;
  603. let lopan = {
  604. id: e[0].value,
  605. name: e[0].label
  606. }
  607. uni.setStorageSync("buildingID", lopan); //楼盘id写入缓存
  608. this.initworkThisWeek()
  609. this.initrealTimeStatistics()
  610. this.initequipment()
  611. this.iniodianloang()
  612. },
  613. // 楼盘选择取消
  614. cancel() {
  615. this.Showhiddenunits = false;
  616. },
  617. tapjumpequipment(i) {
  618. if (this.permissions.commonly5 == true) {
  619. uni.navigateTo({
  620. url: '/pages/mine/equipment/index?active=' + i
  621. });
  622. }
  623. },
  624. prohibitedtap(i) {
  625. if (i == 1) {
  626. uni.navigateTo({
  627. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '0'
  628. });
  629. } else {
  630. if (this.zhixingcenterindex == 2) {
  631. uni.navigateTo({
  632. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '2'
  633. });
  634. } else if (this.zhixingcenterindex == 6) {
  635. uni.navigateTo({
  636. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '3'
  637. });
  638. } else {
  639. uni.navigateTo({
  640. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '4' +
  641. '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd
  642. });
  643. }
  644. }
  645. },
  646. tapjumpreception(i) {
  647. if (this.permissions.commonly2 == true) {
  648. if (i == 1) {
  649. uni.navigateTo({
  650. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '0'
  651. });
  652. } else if (i == 2) {
  653. uni.switchTab({
  654. url: '/pages/index/customer'
  655. });
  656. } else if (i == 3) {
  657. if (this.zhixingcenterindex == 2) {
  658. uni.navigateTo({
  659. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '2'
  660. });
  661. } else if (this.zhixingcenterindex == 6) {
  662. uni.navigateTo({
  663. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '3'
  664. });
  665. } else {
  666. uni.navigateTo({
  667. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '4' +
  668. '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd
  669. });
  670. }
  671. } else if (i == 6) {
  672. uni.navigateTo({
  673. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '0' +
  674. '&validInvalid=0'
  675. });
  676. } else if (i == 7) {
  677. if (this.zhixingcenterindex == 2) {
  678. uni.navigateTo({
  679. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '2' +
  680. '&validInvalid=0'
  681. });
  682. } else if (this.zhixingcenterindex == 6) {
  683. uni.navigateTo({
  684. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '3' +
  685. '&validInvalid=0'
  686. });
  687. } else {
  688. uni.navigateTo({
  689. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '4' +
  690. '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd +
  691. '&validInvalid=0'
  692. });
  693. }
  694. } else {
  695. uni.navigateTo({
  696. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=0' +
  697. '&markAdvisor=0'
  698. });
  699. }
  700. }
  701. },
  702. //集团对比
  703. Groupcontrast() {
  704. uni.navigateTo({
  705. url: '/pages/center/Piabodata/Groupcontrast'
  706. });
  707. },
  708. //团队对比
  709. Theteamcompared() {
  710. // if (this.teamList.length == 0) {
  711. // uni.showToast({
  712. // title: '没有团队呢',
  713. // icon: 'none'
  714. // })
  715. // return
  716. // }
  717. uni.navigateTo({
  718. url: '/pages/center/Piabodata/Theteamcompared'
  719. });
  720. },
  721. //用户洞察
  722. toUserinsightinto() {
  723. uni.navigateTo({
  724. url: '/pages/center/Piabodata/Userinsightinto'
  725. });
  726. },
  727. //趋势分析
  728. toTrendAnalysis() {
  729. uni.navigateTo({
  730. url: '/pages/center/Piabodata/TrendAnalysis'
  731. });
  732. },
  733. //员工分析
  734. toStaffAnalysis() {
  735. // if (this.staffList.length == 0) {
  736. // uni.showToast({
  737. // title: '没有团队呢',
  738. // icon: 'none'
  739. // })
  740. // return
  741. // }
  742. uni.navigateTo({
  743. url: '/pages/center/Piabodata/StaffAnalysis'
  744. });
  745. },
  746. Piabodata(item) {
  747. if (item == '销讲分析') {
  748. uni.navigateTo({
  749. url: '/pages/center/Piabodata/index'
  750. });
  751. } else if (item == '接待记录') {
  752. uni.navigateTo({
  753. url: '/pages/center/records/index?refresh=' + 'refresh'
  754. });
  755. } else if (item == '值班顾问') {
  756. uni.navigateTo({
  757. url: '/pages/mine/consultanonduty/index'
  758. });
  759. } else if (item == '设备管理') {
  760. uni.navigateTo({
  761. url: '/pages/mine/equipment/index'
  762. });
  763. } else if (item == '顾问排名') {
  764. uni.navigateTo({
  765. url: '/pages/center/Piabodata/Employeesstatistics'
  766. });
  767. } else if (item == '违禁记录') {
  768. uni.navigateTo({
  769. url: '/pages/center/prohibited/index?refresh=' + 'refresh'
  770. });
  771. } else {
  772. uni.navigateTo({
  773. url: '/pages/center/consumer/index?refresh=' + 'refresh'
  774. });
  775. }
  776. },
  777. },
  778. };
  779. </script>
  780. <style lang="scss" scoped>
  781. .activecllasscet {
  782. font-size: 28rpx;
  783. font-weight: 400;
  784. color: #008ef2;
  785. }
  786. .cet {
  787. font-size: 28rpx;
  788. font-weight: 400;
  789. color: #333333;
  790. .cetview {
  791. margin-left: 20rpx;
  792. }
  793. }
  794. .cented-box {
  795. padding: 30rpx;
  796. background: #F8F8F8;
  797. width: 100%;
  798. height: 100%;
  799. }
  800. .Switchingbox {
  801. width: 100%;
  802. height: 44rpx;
  803. display: flex;
  804. align-items: center;
  805. .Switching1 {
  806. width: 44rpx;
  807. height: 44rpx;
  808. .Switching1-img {
  809. width: 44rpx;
  810. height: 44rpx;
  811. }
  812. }
  813. .Switching2 {
  814. margin-left: 12rpx;
  815. font-size: 32rpx;
  816. color: #303030;
  817. font-weight: 500;
  818. }
  819. .Switching3 {
  820. width: calc(100% - 280rpx);
  821. font-size: 32rpx;
  822. color: #303030;
  823. font-weight: 500;
  824. }
  825. .Switching4 {
  826. width: 112rpx;
  827. font-size: 28rpx;
  828. color: #303030;
  829. font-weight: 400;
  830. text-align: right;
  831. text-decoration: underline
  832. }
  833. }
  834. .Workcard {
  835. width: 100%;
  836. background: #FFFFFF;
  837. height: 154rpx;
  838. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  839. border-radius: 12rpx;
  840. display: flex;
  841. .Workcard-box {
  842. flex: 1;
  843. height: 100%;
  844. .Workcardimg {
  845. width: 100%;
  846. display: flex;
  847. justify-content: center;
  848. margin-top: 42rpx;
  849. .Workcardimg1 {
  850. width: 64rpx;
  851. height: 36rpx;
  852. background-image: url(../../static/images/battery.png);
  853. background-size: 100% 100%;
  854. padding: 8rpx;
  855. transform: rotate(-90deg);
  856. .bar {
  857. background-color: #43CD80;
  858. height: 100%;
  859. border-radius: 4rpx;
  860. }
  861. .bar1 {
  862. background-color: red;
  863. height: 100%;
  864. border-radius: 4rpx;
  865. }
  866. }
  867. .Workcardimg2 {
  868. width: 56rpx;
  869. height: 36rpx;
  870. }
  871. .Workcardimg3 {
  872. width: 34rpx;
  873. height: 36rpx;
  874. }
  875. .Workcardimg4 {
  876. width: 50rpx;
  877. height: 40rpx;
  878. }
  879. }
  880. .Workcardtext {
  881. width: 100%;
  882. text-align: center;
  883. font-size: 24rpx;
  884. font-weight: 400;
  885. color: #666666;
  886. margin-top: 20rpx;
  887. }
  888. }
  889. }
  890. .title {
  891. width: 100%;
  892. height: 30rpx;
  893. font-size: 30rpx;
  894. font-weight: 600;
  895. color: #333333;
  896. margin-top: 40rpx;
  897. margin-bottom: 24rpx;
  898. }
  899. .shebenbox {
  900. width: 100%;
  901. height: 156rpx;
  902. background: #FFFFFF;
  903. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  904. border-radius: 12rpx;
  905. display: flex;
  906. .shebenche {
  907. width: 25%;
  908. height: 100%;
  909. .shebenchenum {
  910. width: 100%;
  911. font-size: 36rpx;
  912. font-weight: 600;
  913. color: #333333;
  914. text-align: center;
  915. margin-top: 28rpx;
  916. }
  917. .shebenchetext {
  918. width: 100%;
  919. font-size: 24rpx;
  920. font-weight: 400;
  921. color: #666666;
  922. text-align: center;
  923. margin-top: 24rpx;
  924. }
  925. }
  926. }
  927. .real-timebox {
  928. width: 100%;
  929. background: #FFFFFF;
  930. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  931. border-radius: 12rpx;
  932. padding-bottom: 36rpx;
  933. .timebox {
  934. width: 100%;
  935. display: flex;
  936. .real {
  937. flex: 1;
  938. height: 100%;
  939. .realnum {
  940. width: 100%;
  941. font-size: 36rpx;
  942. font-weight: 600;
  943. color: #333333;
  944. text-align: center;
  945. margin-top: 36rpx;
  946. }
  947. .realtext {
  948. width: 100%;
  949. font-size: 24rpx;
  950. font-weight: 400;
  951. color: #666666;
  952. text-align: center;
  953. margin-top: 24rpx;
  954. }
  955. }
  956. }
  957. }
  958. .commonly-box {
  959. width: 100%;
  960. background: #FFFFFF;
  961. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  962. border-radius: 12rpx;
  963. display: flex;
  964. flex-wrap: wrap;
  965. padding-bottom: 36rpx;
  966. .commonly {
  967. width: 25%;
  968. margin-top: 36rpx;
  969. .commonly-img {
  970. width: 100%;
  971. height: 68rpx;
  972. text-align: center;
  973. .commonly-img1 {
  974. width: 68rpx;
  975. height: 68rpx;
  976. border-radius: 50%;
  977. }
  978. }
  979. .commonly-text {
  980. width: 100%;
  981. text-align: center;
  982. font-size: 24rpx;
  983. font-weight: 400;
  984. color: #333333;
  985. margin-top: 16rpx;
  986. }
  987. }
  988. }
  989. .timeview{
  990. height: 80rpx;
  991. line-height: 80rpx;
  992. width: 100%;
  993. text-align: center;
  994. border-bottom: 1px solid #F8F8F8;
  995. }
  996. </style>