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

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