AI销管
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

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