AI销管
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

1314 行
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. //时间选择
  569. tabtimetap(index, str) {
  570. this.timeshow = false;
  571. if (index == 7) {
  572. this.totalTimeShow = true;
  573. } else {
  574. console.log(str)
  575. this.choiceIndex = str
  576. this.zhixingcenterindex = index;
  577. this.initworkThisWeek()
  578. }
  579. },
  580. taptimeisshow() {
  581. this.timeshow = true;
  582. },
  583. //获取权限
  584. getMenu() {
  585. uni.request({
  586. url: config.service.getMenu,
  587. method: "POST",
  588. header: {
  589. 'content-type': 'application/json',
  590. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  591. },
  592. success: (data) => {
  593. console.log(data, 'dsadjsakljlkj123kl12321')
  594. let rescor = data.data;
  595. if (rescor.code == 0) {
  596. uni.setStorageSync("weapp_session_Menu_data", rescor.data)
  597. let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
  598. this.permissions.commonly1 = newmenulist.khgl;
  599. this.permissions.commonly2 = newmenulist.jdjl;
  600. this.permissions.commonly3 = newmenulist.wjjl;
  601. this.permissions.commonly4 = newmenulist.xjfx;
  602. this.permissions.commonly5 = newmenulist.sbgl;
  603. this.permissions.commonly6 = newmenulist.zbgw;
  604. this.permissions.commonly7 = newmenulist.gwpm;
  605. this.permissions.commonly8 = newmenulist.lpdb;
  606. this.permissions.commonly9 = newmenulist.xjqs;
  607. this.permissions.commonly10 = newmenulist.tddb;
  608. this.permissions.commonly11 = newmenulist.gwnl;
  609. this.permissions.commonly12 = newmenulist.yhhx;
  610. this.permissions.myisshebei = newmenulist.wdsb;
  611. this.permissions.shebeinum = newmenulist.sbtj;
  612. this.permissions.shishinum = newmenulist.sstj;
  613. this.permissions.jileinum = newmenulist.gzlj;
  614. }
  615. }
  616. })
  617. },
  618. //自定义时间
  619. totalTimeChange(e) {
  620. this.statDateStart = e.startDate;
  621. this.statDateEnd = e.endDate;
  622. this.choiceIndex = `${e.startDate.replace(/\-/g, '.')}-${e.endDate.replace(/\-/g, '.')}`
  623. this.zhixingcenterindex = 7;
  624. this.initworkThisWeek()
  625. },
  626. tabtimeclick(i) {
  627. if (i == 7) {
  628. this.totalTimeShow = true;
  629. } else {
  630. this.zhixingcenterindex = i;
  631. this.initworkThisWeek()
  632. }
  633. },
  634. initworkThisWeek() {
  635. uni.request({
  636. url: config.service.workThisWeek,
  637. method: "POST",
  638. header: {
  639. 'content-type': 'application/json',
  640. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  641. },
  642. data: {
  643. houseId: this.buildingID,
  644. dateType: this.zhixingcenterindex == 7 ? null : this.zhixingcenterindex,
  645. statDateStart: this.statDateStart,
  646. statDateEnd: this.statDateEnd
  647. },
  648. success: (data) => {
  649. if (data.data.data == null) {
  650. return
  651. } else {
  652. this.Thisweekobj = data.data.data
  653. }
  654. }
  655. })
  656. },
  657. //实时统计
  658. initrealTimeStatistics() {
  659. uni.request({
  660. url: config.service.realTimeStatistics,
  661. method: "POST",
  662. header: {
  663. 'content-type': 'application/json',
  664. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  665. },
  666. data: {
  667. houseId: this.buildingID
  668. },
  669. success: (data) => {
  670. this.LOADING = false
  671. if (data.data.data == null) {
  672. return
  673. } else {
  674. this.realtimeobj = data.data.data
  675. }
  676. },
  677. fail: () => {
  678. this.LOADING = false
  679. }
  680. })
  681. },
  682. // 转写充值剩余
  683. findByHouseIdForRecharge() {
  684. this.$u.get(`/cusLvStatistics/findByHouseIdForRecharge?houseId=${this.buildingID}`).then(res => {
  685. console.log(res)
  686. if (res) {
  687. this.paraphraseObj = res.list
  688. }
  689. })
  690. },
  691. //设备
  692. initequipment() {
  693. uni.request({
  694. url: config.service.findEquipmentState,
  695. method: "POST",
  696. header: {
  697. 'content-type': 'application/json',
  698. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  699. },
  700. data: {
  701. propertyId: this.buildingID
  702. },
  703. success: (data) => {
  704. if (data.data.data == null) {
  705. return
  706. } else {
  707. this.equipmentobj = {
  708. totalNum: data.data.data.totalNum,
  709. onlineNum: data.data.data.onlineNum,
  710. activeNum: data.data.data.activeNum,
  711. lowPowerNum: data.data.data.lowPowerNum,
  712. }
  713. }
  714. }
  715. })
  716. },
  717. // 待处理
  718. waitForOperation() {
  719. this.$u.post('/cusLvStatistics/waitForOperation ', {
  720. houseId: this.buildingID
  721. })
  722. .then(res => {
  723. // console.log(res,'带接待')
  724. this.operation.receptionCount = res.receptionCount
  725. this.operation.accountCount = res.accountCount
  726. this.operation.forbiddenCount = res.forbiddenCount
  727. this.operation.lowPowerNum = res.lowPowerNum
  728. })
  729. },
  730. //我的工牌
  731. iniodianloang() {
  732. uni.request({
  733. url: config.service.findElectricity,
  734. method: "POST",
  735. header: {
  736. 'content-type': 'application/json',
  737. 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
  738. },
  739. data: {
  740. propertyId: this.buildingID,
  741. accPhone: this.userInfo.username
  742. },
  743. success: (data) => {
  744. if (data.data.data == null) {
  745. return
  746. } else {
  747. this.imeiCode = data.data.data.imei
  748. this.openFlag = data.data.data.recCmd
  749. if (data.data.data > 100) {
  750. this.percentage = 100;
  751. } else {
  752. if (data.data.data.onLine == 0) {
  753. this.Whetheroffline = false;
  754. } else {
  755. this.Whetheroffline = true;
  756. this.percentage = data.data.data.electricity;
  757. this.signalDevice = data.data.data.signalDevice / 1;
  758. console.log(this.signalDevice)
  759. this.audioStatus = data.data.data.simAudioStatus;
  760. if (this.signalDevice > 80) {
  761. this.signalDevicetext = '高';
  762. } else {
  763. if (this.signalDevice == 0) {
  764. this.signalDevicetext = '无';
  765. } else {
  766. this.signalDevicetext = '低';
  767. }
  768. }
  769. }
  770. }
  771. }
  772. }
  773. })
  774. },
  775. //选择项目弹框
  776. piskbuilding() {
  777. // this.Showhiddenunits = true;
  778. uni.navigateTo({
  779. url: "../mine/selectBuilding"
  780. })
  781. },
  782. // 项目选择确认
  783. confirm(e) {
  784. this.buildingname = e[0].label;
  785. this.buildingID = e[0].value;
  786. let lopan = {
  787. id: e[0].value,
  788. name: e[0].label
  789. }
  790. uni.setStorageSync("buildingID", lopan); //项目id写入缓存
  791. uni.setStorageSync("orgCode", e[0].orgCode); //项目id写入缓存
  792. this.initworkThisWeek()
  793. this.initrealTimeStatistics()
  794. this.waitForOperation()
  795. this.initequipment()
  796. this.iniodianloang()
  797. },
  798. // 项目选择取消
  799. cancel() {
  800. this.Showhiddenunits = false;
  801. },
  802. tapjumpequipment(i) {
  803. if (this.permissions.commonly5 == true) {
  804. uni.navigateTo({
  805. url: '/pages/mine/equipment/index?active=' + i
  806. });
  807. }
  808. },
  809. prohibitedtap(i) {
  810. if (i == 1) {
  811. uni.navigateTo({
  812. url: '/pages/center/prohibited/index?refresh=refresh&activeTotal=0' + '&violatedStatus=1'
  813. });
  814. } else {
  815. if (this.zhixingcenterindex == 2) {
  816. uni.navigateTo({
  817. url: '/pages/center/prohibited/index?refresh=refresh&activeTotal=2' +
  818. '&violatedStatus=1'
  819. });
  820. } else if (this.zhixingcenterindex == 6) { //近30天
  821. uni.navigateTo({
  822. url: '/pages/center/prohibited/index?refresh=refresh&activeTotal=3' +
  823. '&violatedStatus=1'
  824. });
  825. } else { // 自定义时间段
  826. uni.navigateTo({
  827. url: '/pages/center/prohibited/index?refresh=refresh&activeTotal=4&staTime=' + this
  828. .statDateStart + '&endtime=' + this.statDateEnd + '&violatedStatus=1'
  829. });
  830. }
  831. }
  832. },
  833. tapjumpreception(i) {
  834. if (this.permissions.commonly2 == true) {
  835. if (i == 1) {
  836. uni.navigateTo({
  837. url: '/pages/center/records/index?refresh=refresh&activeTotal=0&validInvalid=0'
  838. });
  839. } else if (i == 11) {
  840. uni.navigateTo({
  841. url: '/pages/center/records/index?refresh=refresh&activeTotal=0'
  842. });
  843. } else if (i == 2) {
  844. uni.switchTab({
  845. url: '/pages/index/customer'
  846. });
  847. } else if (i == 3) {
  848. if (this.zhixingcenterindex == 2) { // 近7天
  849. uni.navigateTo({
  850. url: '/pages/center/records/index?refresh=refresh&activeTotal=2&validInvalid=0'
  851. });
  852. } else if (this.zhixingcenterindex == 6) { //近30天
  853. uni.navigateTo({
  854. url: '/pages/center/records/index?refresh=refresh&activeTotal=3&validInvalid=0'
  855. });
  856. } else { // 自定义时间段
  857. uni.navigateTo({
  858. url: '/pages/center/records/index?refresh=refresh&activeTotal=4&validInvalid=0&staTime=' +
  859. this.statDateStart + '&endtime=' + this.statDateEnd
  860. });
  861. }
  862. } else if (i == 33) {
  863. if (this.zhixingcenterindex == 2) { // 近7天
  864. uni.navigateTo({
  865. url: '/pages/center/records/index?refresh=refresh&activeTotal=2'
  866. });
  867. } else if (this.zhixingcenterindex == 6) { //近30天
  868. uni.navigateTo({
  869. url: '/pages/center/records/index?refresh=refresh&activeTotal=3'
  870. });
  871. } else { // 自定义时间段
  872. uni.navigateTo({
  873. url: '/pages/center/records/index?refresh=refresh&activeTotal=4&staTime=' + this
  874. .statDateStart + '&endtime=' + this.statDateEnd
  875. });
  876. }
  877. } else if (i == 6) {
  878. uni.navigateTo({
  879. url: '/pages/center/records/index?refresh=refresh&activeTotal=0&validInvalid=0'
  880. });
  881. } else if (i == 7) {
  882. if (this.zhixingcenterindex == 2) {
  883. uni.navigateTo({
  884. url: '/pages/center/records/index?refresh=refresh&activeTotal=2&validInvalid=0'
  885. });
  886. } else if (this.zhixingcenterindex == 6) {
  887. uni.navigateTo({
  888. url: '/pages/center/records/index?refresh=refresh&activeTotal=3&validInvalid=0'
  889. });
  890. } else {
  891. uni.navigateTo({
  892. url: '/pages/center/records/index?refresh=refresh&activeTotal=4&validInvalid=0&staTime=' +
  893. this.statDateStart + '&endtime=' + this.statDateEnd
  894. });
  895. }
  896. } else {
  897. uni.navigateTo({
  898. url: '/pages/center/records/index?refresh=refresh&activeTotal=0&markAdvisor=0&validInvalid=0'
  899. });
  900. }
  901. }
  902. },
  903. //集团对比
  904. Groupcontrast() {
  905. uni.navigateTo({
  906. url: '/pages/center/Piabodata/Groupcontrast'
  907. });
  908. },
  909. //团队对比
  910. Theteamcompared() {
  911. // if (this.teamList.length == 0) {
  912. // uni.showToast({
  913. // title: '没有团队呢',
  914. // icon: 'none'
  915. // })
  916. // return
  917. // }
  918. uni.navigateTo({
  919. url: '/pages/center/Piabodata/Theteamcompared'
  920. });
  921. },
  922. //用户洞察
  923. toUserinsightinto() {
  924. uni.navigateTo({
  925. url: '/pages/center/Piabodata/Userinsightinto'
  926. });
  927. },
  928. //趋势分析
  929. toTrendAnalysis() {
  930. uni.navigateTo({
  931. url: '/pages/center/Piabodata/TrendAnalysis'
  932. });
  933. },
  934. //员工分析
  935. toStaffAnalysis() {
  936. // if (this.staffList.length == 0) {
  937. // uni.showToast({
  938. // title: '没有团队呢',
  939. // icon: 'none'
  940. // })
  941. // return
  942. // }
  943. uni.navigateTo({
  944. url: '/pages/center/Piabodata/StaffAnalysis'
  945. });
  946. },
  947. Piabodata(item) {
  948. if (item == '销讲分析') {
  949. uni.navigateTo({
  950. url: '/pages/center/Piabodata/index'
  951. });
  952. } else if (item == '接待记录') {
  953. uni.navigateTo({
  954. url: '/pages/center/records/index?refresh=refresh'
  955. });
  956. } else if (item == '值班顾问') {
  957. uni.navigateTo({
  958. url: '/pages/mine/consultanonduty/index'
  959. });
  960. } else if (item == '设备管理') {
  961. uni.navigateTo({
  962. url: '/pages/mine/equipment/index'
  963. });
  964. } else if (item == '顾问排名') {
  965. uni.navigateTo({
  966. url: '/pages/center/Piabodata/Employeesstatistics'
  967. });
  968. } else if (item == '违禁记录') {
  969. uni.navigateTo({
  970. url: '/pages/center/prohibited/index?refresh=refresh'
  971. });
  972. } else if (item == '日报') {
  973. uni.navigateTo({
  974. url: '/pages/mine/daily/dailyList?refresh=refresh'
  975. });
  976. } else {
  977. uni.navigateTo({
  978. url: '/pages/center/consumer/index?refresh=refresh'
  979. });
  980. }
  981. },
  982. },
  983. };
  984. </script>
  985. <style lang="scss" scoped>
  986. .activecllasscet {
  987. font-size: 28rpx;
  988. font-weight: 400;
  989. color: #008ef2;
  990. }
  991. .cet {
  992. font-size: 28rpx;
  993. font-weight: 400;
  994. color: #333333;
  995. .cetview {
  996. margin-left: 20rpx;
  997. }
  998. }
  999. .cented-box {
  1000. padding: 30rpx;
  1001. background: #F8F8F8;
  1002. width: 100%;
  1003. height: 100%;
  1004. }
  1005. .Switchingbox {
  1006. width: 100%;
  1007. height: 44rpx;
  1008. margin-bottom: 30rpx;
  1009. display: flex;
  1010. align-items: center;
  1011. .Switching1 {
  1012. width: 44rpx;
  1013. height: 44rpx;
  1014. .Switching1-img {
  1015. width: 44rpx;
  1016. height: 44rpx;
  1017. }
  1018. }
  1019. .Switching2 {
  1020. margin: 0 12rpx;
  1021. flex: 1;
  1022. height: 44rpx;
  1023. font-size: 32rpx;
  1024. font-family: PingFangSC-Medium, PingFang SC;
  1025. font-weight: 500;
  1026. color: #303030;
  1027. line-height: 44rpx;
  1028. }
  1029. .Switching4 {
  1030. width: 112rpx;
  1031. font-size: 28rpx;
  1032. color: #303030;
  1033. font-weight: 400;
  1034. text-align: right;
  1035. text-decoration: underline;
  1036. font-family: PingFangSC-Regular, PingFang SC;
  1037. }
  1038. }
  1039. .gongpai {
  1040. margin-bottom: 20rpx;
  1041. }
  1042. .Workcard {
  1043. width: 100%;
  1044. background: #FFFFFF;
  1045. height: 154rpx;
  1046. box-shadow: 0px 0px 12rpx 0px rgba(224, 224, 224, 0.3);
  1047. border-radius: 12rpx;
  1048. display: flex;
  1049. .Workcard-box {
  1050. flex: 1;
  1051. height: 100%;
  1052. .Workcardimg {
  1053. width: 100%;
  1054. display: flex;
  1055. justify-content: center;
  1056. margin-top: 42rpx;
  1057. .Workcardimg1 {
  1058. width: 64rpx;
  1059. height: 36rpx;
  1060. background-image: url(../../static/images/battery.png);
  1061. background-size: 100% 100%;
  1062. padding: 8rpx;
  1063. transform: rotate(-90deg);
  1064. .bar {
  1065. background-color: #43CD80;
  1066. height: 100%;
  1067. border-radius: 4rpx;
  1068. }
  1069. .bar1 {
  1070. background-color: red;
  1071. height: 100%;
  1072. border-radius: 4rpx;
  1073. }
  1074. }
  1075. .Workcardimg2 {
  1076. width: 56rpx;
  1077. height: 36rpx;
  1078. }
  1079. .Workcardimg3 {
  1080. width: 34rpx;
  1081. height: 36rpx;
  1082. }
  1083. .Workcardimg4 {
  1084. width: 50rpx;
  1085. height: 40rpx;
  1086. }
  1087. }
  1088. .Workcardtext {
  1089. width: 100%;
  1090. text-align: center;
  1091. font-size: 24rpx;
  1092. font-weight: 400;
  1093. color: #666666;
  1094. margin-top: 20rpx;
  1095. }
  1096. }
  1097. }
  1098. .contbox {
  1099. width: 690rpx;
  1100. background: #FFFFFF;
  1101. border-radius: 12rpx;
  1102. padding: 24rpx 0 30rpx;
  1103. margin-bottom: 20rpx;
  1104. .title {
  1105. height: 42rpx;
  1106. font-size: 30rpx;
  1107. font-family: PingFangSC-Semibold, PingFang SC;
  1108. font-weight: 600;
  1109. color: #333333;
  1110. line-height: 42rpx;
  1111. margin-bottom: 24rpx;
  1112. display: flex;
  1113. align-items: center;
  1114. .title-icon {
  1115. width: 12rpx;
  1116. height: 20rpx;
  1117. margin-right: 18rpx;
  1118. }
  1119. }
  1120. .timeshow {
  1121. height: 40rpx;
  1122. font-size: 28rpx;
  1123. font-family: PingFangSC-Regular, PingFang SC;
  1124. font-weight: 400;
  1125. color: #666666;
  1126. line-height: 40rpx;
  1127. margin: -18rpx 0 24rpx 35rpx;
  1128. }
  1129. }
  1130. .shebenbox {
  1131. width: 100%;
  1132. display: flex;
  1133. .shebenche {
  1134. width: 25%;
  1135. height: 100%;
  1136. .shebenchenum {
  1137. width: 100%;
  1138. text-align: center;
  1139. height: 50rpx;
  1140. font-size: 36rpx;
  1141. font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  1142. font-weight: bold;
  1143. color: #333333;
  1144. line-height: 50rpx;
  1145. }
  1146. .shebenchetext {
  1147. width: 100%;
  1148. color: #666666;
  1149. text-align: center;
  1150. margin-top: 8rpx;
  1151. height: 32rpx;
  1152. font-size: 24rpx;
  1153. font-family: PingFangSC-Regular, PingFang SC;
  1154. font-weight: 400;
  1155. line-height: 32rpx;
  1156. }
  1157. }
  1158. }
  1159. //今日工作
  1160. .real-timebox {
  1161. width: 100%;
  1162. .timebox {
  1163. width: 100%;
  1164. display: flex;
  1165. margin-bottom: 20rpx;
  1166. .real {
  1167. flex: 1;
  1168. height: 100%;
  1169. .realnum {
  1170. width: 100%;
  1171. text-align: center;
  1172. height: 50rpx;
  1173. font-size: 36rpx;
  1174. font-family: SourceHanSansCN-Medium, SourceHanSansCN;
  1175. font-weight: bold;
  1176. color: #333333;
  1177. line-height: 50rpx;
  1178. .qushi-icon {
  1179. width: 28rpx;
  1180. height: 14rpx;
  1181. margin-left: 2rpx;
  1182. }
  1183. }
  1184. .realtext {
  1185. width: 100%;
  1186. text-align: center;
  1187. margin-top: 8rpx;
  1188. height: 32rpx;
  1189. font-size: 24rpx;
  1190. font-family: PingFangSC-Regular, PingFang SC;
  1191. font-weight: 400;
  1192. color: #666666;
  1193. line-height: 32rpx;
  1194. }
  1195. }
  1196. }
  1197. }
  1198. .commonly-box {
  1199. width: 100%;
  1200. display: flex;
  1201. flex-wrap: wrap;
  1202. .commonly {
  1203. width: 25%;
  1204. margin-bottom: 28rpx;
  1205. .commonly-img {
  1206. width: 100%;
  1207. height: 80rpx;
  1208. text-align: center;
  1209. .commonly-img1 {
  1210. width: 80rpx;
  1211. height: 80rpx;
  1212. }
  1213. }
  1214. .commonly-text {
  1215. width: 100%;
  1216. text-align: center;
  1217. margin-top: 12rpx;
  1218. height: 32rpx;
  1219. font-size: 24rpx;
  1220. font-family: PingFangSC-Regular, PingFang SC;
  1221. font-weight: 400;
  1222. color: #333333;
  1223. line-height: 32rpx;
  1224. }
  1225. }
  1226. }
  1227. .timeview {
  1228. height: 90rpx;
  1229. line-height: 90rpx;
  1230. width: 100%;
  1231. text-align: center;
  1232. border-bottom: 1rpx solid #f8f8f8;
  1233. }
  1234. .endworking {
  1235. margin-top: 20rpx;
  1236. padding: 15rpx 30rpx;
  1237. width: 100%;
  1238. }
  1239. .sixty {
  1240. background-color: #FDFCDA;
  1241. }
  1242. .fifteen {
  1243. background-color: #F9C8C8;
  1244. color: #ff0000;
  1245. }
  1246. </style>