AI销管
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

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