AI销管
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

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