AI销管
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

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