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.
 
 
 
 

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