AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

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