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.
 
 
 
 

1197 rivejä
34 KiB

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