AI销管
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

1193 rader
35 KiB

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