AI销管
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

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