AI销管
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

1285 行
37 KiB

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