AI销管
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

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