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.
 
 
 
 

1265 lines
36 KiB

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