AI销管
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

1116 Zeilen
32 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">{{operation.receptionCount || 0}}</view>
  72. <view class="shebenchetext">接待即将结束</view>
  73. </view>
  74. <view class="shebenche" @click="tapjumpequipment(1)">
  75. <view class="shebenchenum">{{operation.accountCount || 0}}</view>
  76. <view class="shebenchetext">未标顾问</view>
  77. </view>
  78. <view class="shebenche" @click="tapjumpequipment(3)">
  79. <view class="shebenchenum">{{operation.forbiddenCount || 0}}</view>
  80. <view class="shebenchetext">违禁提醒</view>
  81. </view>
  82. <view class="shebenche" @click="tapjumpequipment(2)">
  83. <view class="shebenchenum" style="color: red;">{{operation.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. operation:{
  318. receptionCount:'',
  319. accountCount:'',
  320. forbiddenCount:'',
  321. lowPowerNum:''
  322. },
  323. Menulist: [],
  324. realtimeobj: {
  325. sumCustomer: '',
  326. receivingCustomer: '',
  327. activeCustomer: '',
  328. prohibitedCustomer: '',
  329. tagCustomer: '',
  330. fraction: '',
  331. receptionCount: ''
  332. },
  333. Thisweekobj: {
  334. sumCustomer: '',
  335. receivingCustomer: '',
  336. activeCustomer: '',
  337. prohibitedCustomer: '',
  338. tagCustomer: '',
  339. fraction: '',
  340. receptionCount: ''
  341. },
  342. methodsisshow: false,
  343. zhixingcenterindex: 2,
  344. totalTimeShow: false,
  345. statDateStart: '',
  346. statDateEnd: '',
  347. permissions: {
  348. commonly1: false,
  349. commonly2: false,
  350. commonly3: false,
  351. commonly4: false,
  352. commonly5: false,
  353. commonly6: false,
  354. commonly7: false,
  355. myisshebei: false,
  356. shebeinum: false,
  357. shishinum: false,
  358. jileinum: false
  359. },
  360. // 标记顾问 bjgw
  361. // 接待无效标记 jdwxbj
  362. // 设为优秀案例 swyxal
  363. // 常错词 ccc
  364. // 校准 xz
  365. // 查看违禁执行 ckwjzx
  366. };
  367. },
  368. components: {},
  369. onShow() {
  370. this.getMenu()
  371. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  372. if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
  373. this.methodsisshow = false;
  374. } else {
  375. this.methodsisshow = true;
  376. }
  377. if (this.userInfo.zkProperties.length == 1) {
  378. this.buildingID = uni.getStorageSync('buildingID').id;
  379. this.buildingname = uni.getStorageSync('buildingID').name;
  380. this.buildingishow = false;
  381. } else {
  382. this.buildingishow = true;
  383. this.buildingname = uni.getStorageSync('buildingID').name;
  384. this.buildingID = uni.getStorageSync('buildingID').id;
  385. this.userInfo.zkProperties.forEach(item => {
  386. item.label = item.propertyName;
  387. item.value = item.id
  388. })
  389. this.lpanlist = this.userInfo.zkProperties
  390. }
  391. if (this.userInfo.dataCode == 6) {
  392. // this.Myworkcard = true;
  393. this.equipmentisshow = false;
  394. this.iniodianloang()
  395. } else {
  396. this.equipmentisshow = true;
  397. // this.Myworkcard = false;
  398. this.initequipment()
  399. this.waitForOperation()
  400. }
  401. this.initworkThisWeek()
  402. this.initrealTimeStatistics()
  403. this.sendLog()
  404. },
  405. methods: {
  406. sendLog(){
  407. uni.request({
  408. url: config.service.addLog,
  409. method: "POST",
  410. header: {
  411. 'content-type': 'application/json',
  412. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  413. },
  414. data: {
  415. houseId: this.buildingID,
  416. serviceId:"test"
  417. },
  418. success: (data) => {
  419. console.log(data)
  420. }
  421. })
  422. },
  423. //时间选择
  424. tabtimetap(index,str){
  425. this.timeshow=false;
  426. if (index == 7) {
  427. this.totalTimeShow = true;
  428. } else {
  429. this.choiceIndex=str
  430. this.zhixingcenterindex = index;
  431. this.initworkThisWeek()
  432. }
  433. },
  434. taptimeisshow(){
  435. this.timeshow=true;
  436. },
  437. //获取权限
  438. getMenu() {
  439. uni.request({
  440. url: config.service.getMenu,
  441. method: "POST",
  442. header: {
  443. 'content-type': 'application/json',
  444. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  445. },
  446. success: (data) => {
  447. let rescor = data.data;
  448. if (rescor.code == 0) {
  449. uni.setStorageSync("weapp_session_Menu_data", rescor.data)
  450. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  451. this.permissions.commonly1 = newmenulist.khgl;
  452. this.permissions.commonly2 = newmenulist.jdjl;
  453. this.permissions.commonly3 = newmenulist.wjjl;
  454. this.permissions.commonly4 = newmenulist.xjfx;
  455. this.permissions.commonly5 = newmenulist.sbgl;
  456. this.permissions.commonly6 = newmenulist.zbgw;
  457. this.permissions.commonly7 = newmenulist.gwpm;
  458. this.permissions.commonly8=newmenulist.lpdb;
  459. this.permissions.commonly9=newmenulist.xjqs;
  460. this.permissions.commonly10=newmenulist.tddb;
  461. this.permissions.commonly11=newmenulist.gwnl;
  462. this.permissions.commonly12=newmenulist.yhhx;
  463. this.permissions.myisshebei = newmenulist.wdsb;
  464. this.permissions.shebeinum = newmenulist.sbtj;
  465. this.permissions.shishinum = newmenulist.sstj;
  466. this.permissions.jileinum = newmenulist.gzlj;
  467. }
  468. }
  469. })
  470. },
  471. //自定义时间
  472. totalTimeChange(e) {
  473. this.statDateStart = e.startDate;
  474. this.statDateEnd = e.endDate;
  475. this.choiceIndex=e.startDate+'-'+e.endDate
  476. this.zhixingcenterindex = 7;
  477. this.initworkThisWeek()
  478. },
  479. tabtimeclick(i) {
  480. if (i == 7) {
  481. this.totalTimeShow = true;
  482. } else {
  483. this.zhixingcenterindex = i;
  484. this.initworkThisWeek()
  485. }
  486. },
  487. initworkThisWeek() {
  488. uni.request({
  489. url: config.service.workThisWeek,
  490. method: "POST",
  491. header: {
  492. 'content-type': 'application/json',
  493. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  494. },
  495. data: {
  496. houseId: this.buildingID,
  497. dateType: this.zhixingcenterindex == 7 ? null : this.zhixingcenterindex,
  498. statDateStart: this.statDateStart,
  499. statDateEnd: this.statDateEnd
  500. },
  501. success: (data) => {
  502. if (data.data.data == null) {
  503. return
  504. } else {
  505. this.Thisweekobj = {
  506. sumCustomer: data.data.data.sumCustomer,
  507. receivingCustomer: data.data.data.receivingCustomer,
  508. activeCustomer: data.data.data.activeCustomer,
  509. prohibitedCustomer: data.data.data.prohibitedCustomer,
  510. avgDuration: data.data.data.avgDuration || 0,
  511. tagCustomer: data.data.data.tagCustomer,
  512. fraction: data.data.data.fraction,
  513. receptionCount: data.data.data.receptionCount
  514. }
  515. }
  516. }
  517. })
  518. },
  519. //实时统计
  520. initrealTimeStatistics() {
  521. uni.request({
  522. url: config.service.realTimeStatistics,
  523. method: "POST",
  524. header: {
  525. 'content-type': 'application/json',
  526. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  527. },
  528. data: {
  529. houseId: this.buildingID
  530. },
  531. success: (data) => {
  532. if (data.data.data == null) {
  533. return
  534. } else {
  535. this.realtimeobj = {
  536. sumCustomer: data.data.data.sumCustomer,
  537. receivingCustomer: data.data.data.receivingCustomer,
  538. activeCustomer: data.data.data.activeCustomer,
  539. prohibitedCustomer: data.data.data.prohibitedCustomer,
  540. avgDuration: data.data.data.avgDuration || 0,
  541. tagCustomer: data.data.data.tagCustomer,
  542. fraction: data.data.data.fraction,
  543. receptionCount: data.data.data.receptionCount
  544. }
  545. }
  546. }
  547. })
  548. },
  549. //设备
  550. initequipment() {
  551. uni.request({
  552. url: config.service.findEquipmentState,
  553. method: "POST",
  554. header: {
  555. 'content-type': 'application/json',
  556. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  557. },
  558. data: {
  559. propertyId: this.buildingID
  560. },
  561. success: (data) => {
  562. if (data.data.data == null) {
  563. return
  564. } else {
  565. this.equipmentobj = {
  566. totalNum: data.data.data.totalNum,
  567. onlineNum: data.data.data.onlineNum,
  568. activeNum: data.data.data.activeNum,
  569. lowPowerNum: data.data.data.lowPowerNum,
  570. }
  571. }
  572. }
  573. })
  574. },
  575. // 待处理
  576. waitForOperation (){
  577. this.$u.post('/cusLvStatistics/waitForOperation ',{
  578. houseId:this.buildingID
  579. })
  580. .then(res=>{
  581. // console.log(res,'带接待')
  582. this.operation.receptionCount=res.receptionCount
  583. this.operation.accountCount=res.accountCount
  584. this.operation.forbiddenCount=res.forbiddenCount
  585. this.operation.lowPowerNum=res.lowPowerNum
  586. })
  587. },
  588. //我的工牌
  589. iniodianloang() {
  590. uni.request({
  591. url: config.service.findElectricity,
  592. method: "POST",
  593. header: {
  594. 'content-type': 'application/json',
  595. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  596. },
  597. data: {
  598. propertyId: this.buildingID,
  599. accPhone: this.userInfo.username
  600. },
  601. success: (data) => {
  602. if (data.data.data == null) {
  603. return
  604. } else {
  605. this.imeiCode=data.data.data.imei
  606. this.openFlag=data.data.data.recCmd
  607. if (data.data.data > 100) {
  608. this.percentage = 100;
  609. } else {
  610. if (data.data.data.onLine == 0) {
  611. this.Whetheroffline = false;
  612. } else {
  613. this.Whetheroffline = true;
  614. this.percentage = data.data.data.electricity;
  615. this.signalDevice = data.data.data.signalDevice / 1;
  616. console.log(this.signalDevice)
  617. this.audioStatus = data.data.data.simAudioStatus;
  618. if (this.signalDevice > 80) {
  619. this.signalDevicetext = '高';
  620. } else {
  621. if (this.signalDevice == 0) {
  622. this.signalDevicetext = '无';
  623. } else {
  624. this.signalDevicetext = '低';
  625. }
  626. }
  627. }
  628. }
  629. }
  630. }
  631. })
  632. },
  633. //选择楼盘弹框
  634. piskbuilding() {
  635. this.Showhiddenunits = true;
  636. },
  637. // 楼盘选择确认
  638. confirm(e) {
  639. this.buildingname = e[0].label;
  640. this.buildingID = e[0].value;
  641. let lopan = {
  642. id: e[0].value,
  643. name: e[0].label
  644. }
  645. uni.setStorageSync("buildingID", lopan); //楼盘id写入缓存
  646. this.initworkThisWeek()
  647. this.initrealTimeStatistics()
  648. this.waitForOperation()
  649. this.initequipment()
  650. this.iniodianloang()
  651. },
  652. // 楼盘选择取消
  653. cancel() {
  654. this.Showhiddenunits = false;
  655. },
  656. tapjumpequipment(i) {
  657. if (this.permissions.commonly5 == true) {
  658. uni.navigateTo({
  659. url: '/pages/mine/equipment/index?active=' + i
  660. });
  661. }
  662. },
  663. prohibitedtap(i) {
  664. if (i == 1) {
  665. uni.navigateTo({
  666. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '0'
  667. });
  668. } else {
  669. if (this.zhixingcenterindex == 2) {
  670. uni.navigateTo({
  671. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '2'
  672. });
  673. } else if (this.zhixingcenterindex == 6) {
  674. uni.navigateTo({
  675. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '3'
  676. });
  677. } else {
  678. uni.navigateTo({
  679. url: '/pages/center/prohibited/index?refresh=' + 'refresh' + '&activeTotal=' + '4' +
  680. '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd
  681. });
  682. }
  683. }
  684. },
  685. tapjumpreception(i) {
  686. if (this.permissions.commonly2 == true) {
  687. if (i == 1) {
  688. uni.navigateTo({
  689. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '0'
  690. });
  691. } else if (i == 2) {
  692. uni.switchTab({
  693. url: '/pages/index/customer'
  694. });
  695. } else if (i == 3) {
  696. if (this.zhixingcenterindex == 2) {
  697. uni.navigateTo({
  698. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '2'
  699. });
  700. } else if (this.zhixingcenterindex == 6) {
  701. uni.navigateTo({
  702. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '3'
  703. });
  704. } else {
  705. uni.navigateTo({
  706. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '4' +
  707. '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd
  708. });
  709. }
  710. } else if (i == 6) {
  711. uni.navigateTo({
  712. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '0' +
  713. '&validInvalid=0'
  714. });
  715. } else if (i == 7) {
  716. if (this.zhixingcenterindex == 2) {
  717. uni.navigateTo({
  718. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '2' +
  719. '&validInvalid=0'
  720. });
  721. } else if (this.zhixingcenterindex == 6) {
  722. uni.navigateTo({
  723. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '3' +
  724. '&validInvalid=0'
  725. });
  726. } else {
  727. uni.navigateTo({
  728. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=' + '4' +
  729. '&staTime=' + this.statDateStart + '&endtime=' + this.statDateEnd +
  730. '&validInvalid=0'
  731. });
  732. }
  733. } else {
  734. uni.navigateTo({
  735. url: '/pages/center/records/index?refresh=' + 'refresh' + '&activeTotal=0' +
  736. '&markAdvisor=0'
  737. });
  738. }
  739. }
  740. },
  741. //集团对比
  742. Groupcontrast() {
  743. uni.navigateTo({
  744. url: '/pages/center/Piabodata/Groupcontrast'
  745. });
  746. },
  747. //团队对比
  748. Theteamcompared() {
  749. // if (this.teamList.length == 0) {
  750. // uni.showToast({
  751. // title: '没有团队呢',
  752. // icon: 'none'
  753. // })
  754. // return
  755. // }
  756. uni.navigateTo({
  757. url: '/pages/center/Piabodata/Theteamcompared'
  758. });
  759. },
  760. //用户洞察
  761. toUserinsightinto() {
  762. uni.navigateTo({
  763. url: '/pages/center/Piabodata/Userinsightinto'
  764. });
  765. },
  766. //趋势分析
  767. toTrendAnalysis() {
  768. uni.navigateTo({
  769. url: '/pages/center/Piabodata/TrendAnalysis'
  770. });
  771. },
  772. //员工分析
  773. toStaffAnalysis() {
  774. // if (this.staffList.length == 0) {
  775. // uni.showToast({
  776. // title: '没有团队呢',
  777. // icon: 'none'
  778. // })
  779. // return
  780. // }
  781. uni.navigateTo({
  782. url: '/pages/center/Piabodata/StaffAnalysis'
  783. });
  784. },
  785. Piabodata(item) {
  786. if (item == '销讲分析') {
  787. uni.navigateTo({
  788. url: '/pages/center/Piabodata/index'
  789. });
  790. } else if (item == '接待记录') {
  791. uni.navigateTo({
  792. url: '/pages/center/records/index?refresh=' + 'refresh'
  793. });
  794. } else if (item == '值班顾问') {
  795. uni.navigateTo({
  796. url: '/pages/mine/consultanonduty/index'
  797. });
  798. } else if (item == '设备管理') {
  799. uni.navigateTo({
  800. url: '/pages/mine/equipment/index'
  801. });
  802. } else if (item == '顾问排名') {
  803. uni.navigateTo({
  804. url: '/pages/center/Piabodata/Employeesstatistics'
  805. });
  806. } else if (item == '违禁记录') {
  807. uni.navigateTo({
  808. url: '/pages/center/prohibited/index?refresh=' + 'refresh'
  809. });
  810. } else {
  811. uni.navigateTo({
  812. url: '/pages/center/consumer/index?refresh=' + 'refresh'
  813. });
  814. }
  815. },
  816. },
  817. };
  818. </script>
  819. <style lang="scss" scoped>
  820. .activecllasscet {
  821. font-size: 28rpx;
  822. font-weight: 400;
  823. color: #008ef2;
  824. }
  825. .cet {
  826. font-size: 28rpx;
  827. font-weight: 400;
  828. color: #333333;
  829. .cetview {
  830. margin-left: 20rpx;
  831. }
  832. }
  833. .cented-box {
  834. padding: 30rpx;
  835. background: #F8F8F8;
  836. width: 100%;
  837. height: 100%;
  838. }
  839. .Switchingbox {
  840. width: 100%;
  841. height: 44rpx;
  842. display: flex;
  843. align-items: center;
  844. .Switching1 {
  845. width: 44rpx;
  846. height: 44rpx;
  847. .Switching1-img {
  848. width: 44rpx;
  849. height: 44rpx;
  850. }
  851. }
  852. .Switching2 {
  853. margin-left: 12rpx;
  854. font-size: 32rpx;
  855. color: #303030;
  856. font-weight: 500;
  857. }
  858. .Switching3 {
  859. width: calc(100% - 280rpx);
  860. font-size: 32rpx;
  861. color: #303030;
  862. font-weight: 500;
  863. }
  864. .Switching4 {
  865. width: 112rpx;
  866. font-size: 28rpx;
  867. color: #303030;
  868. font-weight: 400;
  869. text-align: right;
  870. text-decoration: underline
  871. }
  872. }
  873. .Workcard {
  874. width: 100%;
  875. background: #FFFFFF;
  876. height: 154rpx;
  877. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  878. border-radius: 12rpx;
  879. display: flex;
  880. .Workcard-box {
  881. flex: 1;
  882. height: 100%;
  883. .Workcardimg {
  884. width: 100%;
  885. display: flex;
  886. justify-content: center;
  887. margin-top: 42rpx;
  888. .Workcardimg1 {
  889. width: 64rpx;
  890. height: 36rpx;
  891. background-image: url(../../static/images/battery.png);
  892. background-size: 100% 100%;
  893. padding: 8rpx;
  894. transform: rotate(-90deg);
  895. .bar {
  896. background-color: #43CD80;
  897. height: 100%;
  898. border-radius: 4rpx;
  899. }
  900. .bar1 {
  901. background-color: red;
  902. height: 100%;
  903. border-radius: 4rpx;
  904. }
  905. }
  906. .Workcardimg2 {
  907. width: 56rpx;
  908. height: 36rpx;
  909. }
  910. .Workcardimg3 {
  911. width: 34rpx;
  912. height: 36rpx;
  913. }
  914. .Workcardimg4 {
  915. width: 50rpx;
  916. height: 40rpx;
  917. }
  918. }
  919. .Workcardtext {
  920. width: 100%;
  921. text-align: center;
  922. font-size: 24rpx;
  923. font-weight: 400;
  924. color: #666666;
  925. margin-top: 20rpx;
  926. }
  927. }
  928. }
  929. .title {
  930. width: 100%;
  931. height: 30rpx;
  932. font-size: 30rpx;
  933. font-weight: 600;
  934. color: #333333;
  935. margin-top: 40rpx;
  936. margin-bottom: 24rpx;
  937. }
  938. .shebenbox {
  939. width: 100%;
  940. height: 156rpx;
  941. background: #FFFFFF;
  942. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  943. border-radius: 12rpx;
  944. display: flex;
  945. .shebenche {
  946. width: 25%;
  947. height: 100%;
  948. .shebenchenum {
  949. width: 100%;
  950. font-size: 36rpx;
  951. font-weight: 600;
  952. color: #333333;
  953. text-align: center;
  954. margin-top: 28rpx;
  955. }
  956. .shebenchetext {
  957. width: 100%;
  958. font-size: 24rpx;
  959. font-weight: 400;
  960. color: #666666;
  961. text-align: center;
  962. margin-top: 24rpx;
  963. }
  964. }
  965. }
  966. .real-timebox {
  967. width: 100%;
  968. background: #FFFFFF;
  969. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  970. border-radius: 12rpx;
  971. padding-bottom: 36rpx;
  972. .timebox {
  973. width: 100%;
  974. display: flex;
  975. .real {
  976. flex: 1;
  977. height: 100%;
  978. .realnum {
  979. width: 100%;
  980. font-size: 36rpx;
  981. font-weight: 600;
  982. color: #333333;
  983. text-align: center;
  984. margin-top: 36rpx;
  985. }
  986. .realtext {
  987. width: 100%;
  988. font-size: 24rpx;
  989. font-weight: 400;
  990. color: #666666;
  991. text-align: center;
  992. margin-top: 24rpx;
  993. }
  994. }
  995. }
  996. }
  997. .commonly-box {
  998. width: 100%;
  999. background: #FFFFFF;
  1000. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  1001. border-radius: 12rpx;
  1002. display: flex;
  1003. flex-wrap: wrap;
  1004. padding-bottom: 36rpx;
  1005. .commonly {
  1006. width: 25%;
  1007. margin-top: 36rpx;
  1008. .commonly-img {
  1009. width: 100%;
  1010. height: 68rpx;
  1011. text-align: center;
  1012. .commonly-img1 {
  1013. width: 68rpx;
  1014. height: 68rpx;
  1015. border-radius: 50%;
  1016. }
  1017. }
  1018. .commonly-text {
  1019. width: 100%;
  1020. text-align: center;
  1021. font-size: 24rpx;
  1022. font-weight: 400;
  1023. color: #333333;
  1024. margin-top: 16rpx;
  1025. }
  1026. }
  1027. }
  1028. .timeview{
  1029. height: 80rpx;
  1030. line-height: 80rpx;
  1031. width: 100%;
  1032. text-align: center;
  1033. border-bottom: 1px solid #F8F8F8;
  1034. }
  1035. </style>