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.
 
 
 

1144 lines
29 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">{{ isPuqiang ? '项目' : '客户' }}:</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;" v-if="Myworkcard">
  12. 我的工牌
  13. <template v-if="equipmentObj.imei">
  14. <text style="margin-left: 20rpx;">{{ equipmentObj.imei }}</text>
  15. </template>
  16. </view>
  17. <view v-if="Myworkcard">
  18. <view class="Workcard" v-if="Whetheroffline==true">
  19. <view class="Workcard-box">
  20. <view class="Workcardimg">
  21. <view class="Workcardimg1">
  22. <view v-if="percentage>20" class="bar" :style="{width : percentage + '%' }"></view>
  23. <view v-if="percentage<20" class="bar1" :style="{width : percentage + '%' }"></view>
  24. </view>
  25. </view>
  26. <view class="Workcardtext">电量:{{percentage}}%</view>
  27. </view>
  28. <view class="Workcard-box">
  29. <view class="Workcardimg">
  30. <image v-if="signalDevice==''" class="Workcardimg2" src="../../static/images/signal0.png"
  31. mode=""></image>
  32. <image v-else-if="signalDevice<20 && signalDevice>0" class="Workcardimg2"
  33. src="../../static/images/signal1.png" mode=""></image>
  34. <image v-else-if="signalDevice<50 && signalDevice>20" class="Workcardimg2"
  35. src="../../static/images/signal2.png" mode=""></image>
  36. <image v-else-if="signalDevice<70 && signalDevice>50" class="Workcardimg2"
  37. src="../../static/images/signal3.png" mode=""></image>
  38. <image v-else-if="signalDevice<90 && signalDevice>70" class="Workcardimg2"
  39. src="../../static/images/signal4.png" mode=""></image>
  40. <image v-else-if="signalDevice<=100 && signalDevice>90" class="Workcardimg2"
  41. src="../../static/images/signal5.png" mode=""></image>
  42. </view>
  43. <view class="Workcardtext">信号:{{signalDevicetext}}</view>
  44. </view>
  45. <view class="Workcard-box">
  46. <view class="Workcardimg">
  47. <image v-if="audioStatus=='true'" class="Workcardimg3"
  48. src="../../static/images/Thtapedrive1.png" mode=""></image>
  49. <image v-if="audioStatus=='false'" class="Workcardimg3"
  50. src="../../static/images/Thtapedrive2.png" mode=""></image>
  51. </view>
  52. <view v-if="audioStatus=='true'" class="Workcardtext">录音:已开启</view>
  53. <view v-if="audioStatus=='false'" class="Workcardtext">录音:未开启</view>
  54. </view>
  55. </view>
  56. <view class="Workcard" v-if="Whetheroffline==false">
  57. <view class="Workcard-box">
  58. <view class="Workcardimg">
  59. <image class="Workcardimg4" src="../../static/images/offline.png" mode=""></image>
  60. </view>
  61. <view class="Workcardtext">设备离线</view>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="title" v-if="equipmentisshow">设备</view>
  66. <view class="shebenbox" v-if="equipmentisshow">
  67. <view class="shebenche" @click="tapjumpequipment(0)">
  68. <view class="shebenchenum">{{equipmentobj.totalNum || 0}}</view>
  69. <view class="shebenchetext">设备总数</view>
  70. </view>
  71. <view class="shebenche" @click="tapjumpequipment(1)">
  72. <view class="shebenchenum">{{equipmentobj.onlineNum || 0}}</view>
  73. <view class="shebenchetext">在线</view>
  74. </view>
  75. <view class="shebenche" @click="tapjumpequipment(3)">
  76. <view class="shebenchenum">{{equipmentobj.activeNum || 0}}</view>
  77. <view class="shebenchetext">活跃</view>
  78. </view>
  79. <view class="shebenche" @click="tapjumpequipment(2)">
  80. <view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum || 0}}</view>
  81. <view class="shebenchetext">急需充电</view>
  82. </view>
  83. </view>
  84. <view class="title">实时统计</view>
  85. <view class="real-timebox">
  86. <view class="timebox">
  87. <view class="real" @click="tapjumpreception(checkParams('1'))">
  88. <view class="realnum">{{realtimeobj.receptionCount || 0}}</view>
  89. <view class="realtext">接待量</view>
  90. </view>
  91. <view class="real" @click="tapjumpreception(checkParams('6'))">
  92. <view class="realnum">{{realtimeobj.activeCustomer|| 0}}</view>
  93. <view class="realtext">有效接待</view>
  94. </view>
  95. <view class="real" @click="switchJump">
  96. <view class="realnum">{{realtimeobj.receivingCustomer || 0}}</view>
  97. <view class="realtext">正在接待</view>
  98. </view>
  99. <view class="real" @click="tapjumpreception(checkParams('4'))">
  100. <view class="realnum">{{realtimeobj.tagCustomer || 0}}</view>
  101. <view class="realtext">未标顾问</view>
  102. </view>
  103. </view>
  104. <view class="timebox">
  105. <view class="real" @click="tapjumpreception(checkParams('auth'))">
  106. <view class="realnum">{{realtimeobj.avgDuration|| 0}}</view>
  107. <view class="realtext">平均接待时长</view>
  108. </view>
  109. <view class="real" @click="tapjumpreception(checkParams('auth'))">
  110. <view class="realnum">{{realtimeobj.fraction || 0}}%</view>
  111. <view class="realtext">平均执行率</view>
  112. </view>
  113. <view class="real" @click="tapjumpreception(checkParams('6'))">
  114. <view class="realnum">{{realtimeobj.wordFraction || 0}}%</view>
  115. <view class="realtext">平均挖掘率</view>
  116. </view>
  117. <view class="real">
  118. <view @click="prohibitedtap(1)" v-if="methodsisshow==true" class="realnum" style="color: red;">
  119. {{realtimeobj.prohibitedCustomer || 0}}
  120. </view>
  121. <view @click="prohibitedtap(1)" v-if="methodsisshow==true" class="realtext">违禁预警</view>
  122. </view>
  123. </view>
  124. </view>
  125. <view class="title" style="display: flex;">
  126. <view style="width: 55%;">概览</view>
  127. <view class="cet" style="display: flex;">
  128. <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 2 }" @click="tabtimeclick(2)">近7天
  129. </view>
  130. <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 6 }" @click="tabtimeclick(6)">
  131. 近30天</view>
  132. <view class="cetview" :class="{ activecllasscet: zhixingcenterindex == 7 }" @click="tabtimeclick(7)">自定义
  133. </view>
  134. </view>
  135. </view>
  136. <view class="real-timebox">
  137. <view class="timebox">
  138. <view class="real" @click="tapjumpreception(checkParams('3'))">
  139. <view class="realnum">{{Thisweekobj.receptionCount || 0}}</view>
  140. <view class="realtext">接待量</view>
  141. </view>
  142. <view class="real" @click="tapjumpreception(checkParams('7'))">
  143. <view class="realnum">{{Thisweekobj.activeCustomer|| 0}}</view>
  144. <view class="realtext">有效接待</view>
  145. </view>
  146. <view class="real" @click="tapjumpreception(checkParams('333'))">
  147. <view class="realnum">{{Thisweekobj.fraction>100?100:(Thisweekobj.fraction||0)}}%</view>
  148. <view class="realtext">平均执行率</view>
  149. </view>
  150. </view>
  151. <view class="timebox">
  152. <view class="real" @click="tapjumpreception(checkParams('333'))">
  153. <view class="realnum">{{Thisweekobj.avgDuration|| 0}}</view>
  154. <view class="realtext">平均接待时长</view>
  155. </view>
  156. <view class="real" @click="tapjumpreception(checkParams('333'))">
  157. <view class="realnum">{{Thisweekobj.wordFraction || 0}}%</view>
  158. <view class="realtext">平均挖掘率</view>
  159. </view>
  160. <view class="real" @click="prohibitedtap(2)" v-if="methodsisshow==true">
  161. <view class="realnum" style="color: red;">{{Thisweekobj.prohibitedCustomer || 0}}</view>
  162. <view class="realtext">违禁预警</view>
  163. </view>
  164. <view class="real" v-else>
  165. <view class="realnum"></view>
  166. <view class="realtext"></view>
  167. </view>
  168. </view>
  169. </view>
  170. <view class="title">常用功能</view>
  171. <view class="commonly-box">
  172. <!-- 权限菜单控制显隐 因为后台添加的按钮权限并不会在此返回所以需要手动添加 showMenu -->
  173. <view class="commonly" @click="Piabodata(item.name)" v-for="(item,index) in Menulist" :key="index"
  174. v-if="showMenu(item.name)">
  175. <view class="commonly-img">
  176. <image class="commonly-img1" :src="item.name | imgFilter" mode=""></image>
  177. </view>
  178. <view class="commonly-text">{{item.name}}</view>
  179. </view>
  180. </view>
  181. <!-- 项目切换 -->
  182. <view v-if="Showhiddenunits">
  183. <u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="lpanlist"
  184. @cancel="cancel" @confirm="confirm"></u-select>
  185. </view>
  186. <u-calendar v-model="totalTimeShow" mode="range" @change="totalTimeChange"></u-calendar>
  187. <view class="update" v-if="isShowUpdate">
  188. <view class="updateBox">
  189. <view class="top">
  190. <image src="../../static/images/updateIcon.png"></image>
  191. </view>
  192. <view class="content">
  193. <view class="tit">{{tit}}</view>
  194. <u-parse class="ql-editor" :content="content" @preview="preview" @navigate="navigate" />
  195. <!-- <rich-text :nodes="content"></rich-text> -->
  196. </view>
  197. <view class="btn" @click="lookDetail">查看详情</view>
  198. <view class="close" @click="close">
  199. <u-icon name="close-circle" size="80" color="#FFFFFF"></u-icon>
  200. </view>
  201. </view>
  202. </view>
  203. <!-- 加载组件 -->
  204. <loading v-model="LOADING"></loading>
  205. <u-tabbar activeColor="#1296db" inactiveColor="#999999" v-model="current" :list="tabbarList"></u-tabbar>
  206. </view>
  207. </template>
  208. <script>
  209. var config = require("../../config");
  210. var util = require("../../utils/util.js");
  211. import tabbarList from '@/utils/tabbar.js'
  212. import uParse from '../../components/gaoyia-parse/parse.vue'
  213. import loading from "@/components/loading/index.vue"
  214. export default {
  215. components: {
  216. uParse,
  217. loading
  218. },
  219. data() {
  220. return {
  221. id: "",
  222. isShowUpdate: false,
  223. tit: "",
  224. content: "",
  225. tabbarList: tabbarList,
  226. current: 0,
  227. userInfo: {},
  228. Showhiddenunits: false,
  229. lpanlist: [], //项目列表
  230. buildingname: '', //项目名
  231. buildingID: '', //项目id
  232. buildingishow: false, //是否选择项目
  233. Myworkcard: false,
  234. percentage: '', //设备电量
  235. Whetheroffline: false, //是否离线
  236. signalDevice: 0, //信号
  237. signalDevicetext: "",
  238. audioStatus: false,
  239. equipmentisshow: false,
  240. equipmentobj: { // 统计设备状态
  241. totalNum: '',
  242. onlineNum: '',
  243. activeNum: '',
  244. lowPowerNum: '',
  245. },
  246. equipmentObj: {}, // 接口返回设备信息2
  247. Menulist: [],
  248. realtimeobj: {
  249. sumCustomer: '',
  250. receivingCustomer: '',
  251. activeCustomer: '',
  252. prohibitedCustomer: '',
  253. tagCustomer: '',
  254. fraction: '',
  255. wordFraction: '',
  256. receptionCount: ''
  257. },
  258. Thisweekobj: {
  259. sumCustomer: '',
  260. receivingCustomer: '',
  261. activeCustomer: '',
  262. prohibitedCustomer: '',
  263. tagCustomer: '',
  264. fraction: '',
  265. wordFraction: '',
  266. receptionCount: ''
  267. },
  268. methodsisshow: false,
  269. zhixingcenterindex: 2,
  270. totalTimeShow: false,
  271. statDateStart: '',
  272. statDateEnd: '',
  273. needShow: ['客户管理', '接待记录', '销讲数据', '设备管理', '值班顾问', '顾问排名', '违禁记录'], // 权限配置需要展示出来的功能入口
  274. };
  275. },
  276. computed: {
  277. // 是否是普强小程序
  278. showMenu() {
  279. return name => {
  280. if (this.needShow.findIndex(item => item == name) != -1) {
  281. return true
  282. } else {
  283. return false
  284. }
  285. }
  286. },
  287. // 是否是普强小程序
  288. isPuqiang() {
  289. return config.service.host.indexOf('xitong.pachira.cn') == -1
  290. },
  291. },
  292. onLoad() {
  293. if (!this.isPuqiang) {
  294. uni.setNavigationBarTitle({
  295. title: 'AI营销辅助平台'
  296. })
  297. }
  298. this.initPopup()
  299. },
  300. onShow() {
  301. this.LOADING = true
  302. this.getMenu()
  303. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  304. if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
  305. this.methodsisshow = false;
  306. } else {
  307. this.methodsisshow = true;
  308. }
  309. if (this.userInfo.zkProperties.length == 1) {
  310. this.buildingID = uni.getStorageSync('buildingID').id;
  311. this.buildingname = uni.getStorageSync('buildingID').name;
  312. this.buildingishow = false;
  313. } else {
  314. this.buildingishow = true;
  315. this.buildingname = uni.getStorageSync('buildingID').name;
  316. this.buildingID = uni.getStorageSync('buildingID').id;
  317. this.userInfo.zkProperties.forEach(item => {
  318. item.label = item.propertyName;
  319. item.value = item.id
  320. })
  321. this.lpanlist = this.userInfo.zkProperties
  322. }
  323. if (this.userInfo.dataCode == 6) {
  324. this.Myworkcard = true;
  325. this.equipmentisshow = false;
  326. this.iniodianloang()
  327. } else {
  328. this.equipmentisshow = true;
  329. this.Myworkcard = false;
  330. this.initequipment()
  331. }
  332. this.initworkThisWeek()
  333. this.initrealTimeStatistics()
  334. this.updateInit()
  335. },
  336. onPullDownRefresh() {
  337. this.getMenu()
  338. this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
  339. if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
  340. this.methodsisshow = false;
  341. } else {
  342. this.methodsisshow = true;
  343. }
  344. if (this.userInfo.zkProperties.length == 1) {
  345. this.buildingID = uni.getStorageSync('buildingID').id;
  346. this.buildingname = uni.getStorageSync('buildingID').name;
  347. this.buildingishow = false;
  348. } else {
  349. this.buildingishow = true;
  350. this.buildingname = uni.getStorageSync('buildingID').name;
  351. this.buildingID = uni.getStorageSync('buildingID').id;
  352. this.userInfo.zkProperties.forEach(item => {
  353. item.label = item.propertyName;
  354. item.value = item.id
  355. })
  356. this.lpanlist = this.userInfo.zkProperties
  357. }
  358. if (this.userInfo.dataCode == 6) {
  359. // this.Myworkcard = true;
  360. this.equipmentisshow = false;
  361. this.iniodianloang()
  362. } else {
  363. this.equipmentisshow = true;
  364. // this.Myworkcard = false;
  365. this.initequipment()
  366. // this.waitForOperation()
  367. }
  368. this.initworkThisWeek()
  369. this.initrealTimeStatistics()
  370. setTimeout(() => {
  371. uni.stopPullDownRefresh()
  372. }, 3000)
  373. },
  374. methods: {
  375. towajue() {
  376. uni.navigateTo({
  377. url: "/pages/center/Piabodata/requireminingAnalysis"
  378. })
  379. },
  380. close() {
  381. this.isShowUpdate = false;
  382. },
  383. lookDetail() {
  384. let datas = {
  385. id: this.id,
  386. title: this.tit,
  387. content: this.content
  388. }
  389. this.$store.commit('setMessageObj', datas)
  390. uni.navigateTo({
  391. url: "../mine/messageDetail"
  392. })
  393. let data = {
  394. id: this.id,
  395. accountId: uni.getStorageSync('weapp_session_userInfo_data').accountId
  396. }
  397. uni.request({
  398. url: config.service.updateRead,
  399. method: "GET",
  400. header: {
  401. 'content-type': 'application/json',
  402. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  403. },
  404. data,
  405. success: (res) => {
  406. this.initPopup()
  407. }
  408. })
  409. this.isShowUpdate = false;
  410. },
  411. initPopup() {
  412. uni.request({
  413. url: config.service.updatePopup,
  414. method: "GET",
  415. header: {
  416. 'content-type': 'application/json',
  417. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  418. },
  419. data: {
  420. },
  421. success: (res) => {
  422. let data = res.data.data
  423. if (data) {
  424. this.first(data.id)
  425. this.content = data.content
  426. this.tit = data.title
  427. this.aid = data.accountId
  428. this.id = data.id
  429. this.isShowUpdate = data.readFlag == 0 ? true : false;
  430. }
  431. }
  432. })
  433. },
  434. first(id) {
  435. uni.request({
  436. url: config.service.firstShowPopup,
  437. method: "GET",
  438. header: {
  439. 'content-type': 'application/json',
  440. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  441. },
  442. data: {
  443. id
  444. },
  445. success: (res) => {}
  446. })
  447. },
  448. updateInit() {
  449. uni.request({
  450. url: config.service.notReadNum,
  451. method: "GET",
  452. data: {
  453. id: uni.getStorageSync('weapp_session_userInfo_data').accountId,
  454. projectId: uni.getStorageSync('buildingID').id,
  455. },
  456. header: {
  457. 'content-type': 'application/json',
  458. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  459. },
  460. success: (res) => {
  461. this.count = res.data.data
  462. this.tabbarList[3].count = res.data.data || 0
  463. }
  464. })
  465. },
  466. //获取权限
  467. getMenu() {
  468. this.$u.get("/user/getMenu").then(data => {
  469. uni.setStorageSync("weapp_session_Menu_data", data)
  470. this.Menulist = uni.getStorageSync('weapp_session_Menu_data');
  471. // console.log(this.Menulist, 'adasdasds123')
  472. })
  473. },
  474. //自定义时间
  475. totalTimeChange(e) {
  476. this.statDateStart = e.startDate;
  477. this.statDateEnd = e.endDate;
  478. this.zhixingcenterindex = 7;
  479. this.initworkThisWeek()
  480. },
  481. //时间选择
  482. tabtimeclick(i) {
  483. if (i == 7) {
  484. this.totalTimeShow = true;
  485. } else {
  486. this.zhixingcenterindex = i;
  487. this.initworkThisWeek()
  488. }
  489. },
  490. //获取概览数据
  491. initworkThisWeek() {
  492. uni.request({
  493. url: config.service.workThisWeek,
  494. method: "POST",
  495. header: {
  496. 'content-type': 'application/json',
  497. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  498. },
  499. data: {
  500. houseId: this.buildingID,
  501. dateType: this.zhixingcenterindex == 7 ? null : this.zhixingcenterindex,
  502. statDateStart: this.statDateStart,
  503. statDateEnd: this.statDateEnd
  504. },
  505. success: (data) => {
  506. if (data.data.data == null) {
  507. return
  508. } else {
  509. this.Thisweekobj = {
  510. sumCustomer: data.data.data.sumCustomer,
  511. receivingCustomer: data.data.data.receivingCustomer,
  512. activeCustomer: data.data.data.activeCustomer,
  513. prohibitedCustomer: data.data.data.prohibitedCustomer,
  514. avgDuration: Math.floor(data.data.data.avgDuration / 60) || 0,
  515. tagCustomer: data.data.data.tagCustomer,
  516. fraction: data.data.data.fraction,
  517. wordFraction: data.data.data.wordFraction,
  518. receptionCount: data.data.data.receptionCount
  519. }
  520. }
  521. }
  522. })
  523. },
  524. //实时统计
  525. initrealTimeStatistics() {
  526. uni.request({
  527. url: config.service.realTimeStatistics,
  528. method: "POST",
  529. header: {
  530. 'content-type': 'application/json',
  531. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  532. },
  533. data: {
  534. houseId: this.buildingID
  535. },
  536. success: (data) => {
  537. this.LOADING = false
  538. if (data.data.data == null) {
  539. return
  540. } else {
  541. this.realtimeobj = {
  542. sumCustomer: data.data.data.sumCustomer,
  543. receivingCustomer: data.data.data.receivingCustomer,
  544. activeCustomer: data.data.data.activeCustomer,
  545. prohibitedCustomer: data.data.data.prohibitedCustomer,
  546. avgDuration: Math.floor(data.data.data.avgDuration / 60) || 0,
  547. tagCustomer: data.data.data.tagCustomer,
  548. fraction: data.data.data.fraction,
  549. wordFraction: data.data.data.wordFraction,
  550. receptionCount: data.data.data.receptionCount
  551. }
  552. }
  553. },
  554. fail: () => {
  555. this.LOADING = false
  556. }
  557. })
  558. },
  559. //设备
  560. initequipment() {
  561. uni.request({
  562. url: config.service.findEquipmentState,
  563. method: "POST",
  564. header: {
  565. 'content-type': 'application/json',
  566. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  567. },
  568. data: {
  569. propertyId: this.buildingID
  570. },
  571. success: (data) => {
  572. if (data.data.data == null) {
  573. return
  574. } else {
  575. this.equipmentobj = {
  576. totalNum: data.data.data.totalNum,
  577. onlineNum: data.data.data.onlineNum,
  578. activeNum: data.data.data.activeNum,
  579. lowPowerNum: data.data.data.lowPowerNum,
  580. }
  581. }
  582. }
  583. })
  584. },
  585. //我的工牌
  586. iniodianloang() {
  587. uni.request({
  588. url: config.service.findElectricity,
  589. method: "POST",
  590. header: {
  591. 'content-type': 'application/json',
  592. 'Access-Token': uni.getStorageSync('weapp_session_login_data').token
  593. },
  594. data: {},
  595. success: (data) => {
  596. if (data.data.data == null) {
  597. return
  598. } else {
  599. if (data.data.data > 100) {
  600. this.percentage = 100;
  601. } else {
  602. this.equipmentObj = data.data.data
  603. if (data.data.data.onLine == 0) {
  604. this.Whetheroffline = false;
  605. } else {
  606. this.Whetheroffline = true;
  607. this.percentage = data.data.data.electricity;
  608. this.signalDevice = data.data.data.signalDevice / 1;
  609. console.log(this.signalDevice)
  610. this.audioStatus = data.data.data.audioStatus;
  611. if (this.signalDevice > 80) {
  612. this.signalDevicetext = '高';
  613. } else {
  614. if (this.signalDevice == 0) {
  615. this.signalDevicetext = '无';
  616. } else {
  617. this.signalDevicetext = '低';
  618. }
  619. }
  620. }
  621. }
  622. }
  623. }
  624. })
  625. },
  626. //选择项目弹框
  627. piskbuilding() {
  628. // this.Showhiddenunits = true;
  629. uni.navigateTo({
  630. url: "../mine/selectBuilding"
  631. })
  632. },
  633. // 项目选择确认
  634. confirm(e) {
  635. this.buildingname = e[0].label;
  636. this.buildingID = e[0].value;
  637. let lopan = {
  638. id: e[0].value,
  639. name: e[0].label
  640. }
  641. uni.setStorageSync("buildingID", lopan); //项目id写入缓存
  642. this.initworkThisWeek()
  643. this.initrealTimeStatistics()
  644. this.initequipment()
  645. this.iniodianloang()
  646. },
  647. // 项目选择取消
  648. cancel() {
  649. this.Showhiddenunits = false;
  650. },
  651. // 设备模块跳转
  652. tapjumpequipment(i) {
  653. if (this.checkAuthority('设备管理')) {
  654. uni.navigateTo({
  655. url: '/pages/mine/equipment/index?active=' + i
  656. });
  657. }
  658. },
  659. // 违禁模块跳转
  660. prohibitedtap(i) {
  661. let str = ''
  662. if (i == 1) {
  663. str = '&activeTotal=0'
  664. } else {
  665. if (this.zhixingcenterindex == 2) {
  666. str = '&activeTotal=2'
  667. } else if (this.zhixingcenterindex == 6) {
  668. str = '&activeTotal=3'
  669. } else {
  670. str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}`
  671. }
  672. }
  673. uni.navigateTo({
  674. url: `/pages/center/prohibited/index?refresh=refresh&violatedStatus=1${str}`
  675. })
  676. },
  677. // 跳转正在接待页面
  678. switchJump() {
  679. uni.switchTab({
  680. url: '/pages/index/customer'
  681. });
  682. },
  683. // 跳转参数
  684. checkParams(i) {
  685. let str = ''
  686. switch (i) {
  687. case '1':
  688. str = '&activeTotal=0';
  689. break;
  690. case 'auth':
  691. str = '&activeTotal=0&validInvalid=0'
  692. break;
  693. case '3':
  694. // 筛选时间类型后传的参数
  695. if (this.zhixingcenterindex == 2) {
  696. str = '&activeTotal=2'
  697. } else if (this.zhixingcenterindex == 6) {
  698. str = '&activeTotal=3'
  699. } else {
  700. str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}`
  701. }
  702. break;
  703. case '333':
  704. case '7':
  705. if (this.zhixingcenterindex == 2) {
  706. str = '&activeTotal=2&validInvalid=0'
  707. } else if (this.zhixingcenterindex == 6) {
  708. str = '&activeTotal=3&validInvalid=0'
  709. } else {
  710. str = `&activeTotal=4&staTime=${this.statDateStart}&endtime=${this.statDateEnd}&validInvalid=0`
  711. }
  712. break;
  713. case '6':
  714. str = '&activeTotal=0&validInvalid=0'
  715. break;
  716. case '4':
  717. str = '&activeTotal=0&markAdvisor=0&validInvalid=0'
  718. break;
  719. default:
  720. str = '&activeTotal=0&markAdvisor=0'
  721. break;
  722. }
  723. return str
  724. },
  725. // 接待记录跳转
  726. tapjumpreception(params) {
  727. // 校验是否有权限
  728. if (this.checkAuthority('接待记录')) {
  729. uni.navigateTo({
  730. url: `/pages/center/records/index?refresh=refresh${params}`
  731. });
  732. }
  733. },
  734. // 权限菜单跳转
  735. Piabodata(item) {
  736. if (item == '销讲数据') {
  737. uni.navigateTo({
  738. url: '/pages/center/Piabodata/index'
  739. });
  740. } else if (item == '接待记录') {
  741. uni.navigateTo({
  742. url: '/pages/center/records/index?refresh=refresh'
  743. });
  744. } else if (item == '值班顾问') {
  745. uni.navigateTo({
  746. url: '/pages/mine/consultanonduty/index'
  747. });
  748. } else if (item == '设备管理') {
  749. uni.navigateTo({
  750. url: '/pages/mine/equipment/index'
  751. });
  752. } else if (item == '顾问排名') {
  753. uni.navigateTo({
  754. url: '/pages/center/Piabodata/Employeesstatistics'
  755. });
  756. } else if (item == '违禁记录') {
  757. uni.navigateTo({
  758. url: '/pages/center/prohibited/index?refresh=refresh'
  759. });
  760. } else {
  761. uni.navigateTo({
  762. url: '/pages/center/consumer/index?refresh=refresh'
  763. });
  764. }
  765. },
  766. },
  767. filters: {
  768. imgFilter(type) {
  769. let path = ''
  770. switch (type) {
  771. case '客户管理':
  772. path = '../../static/images/function1.png'
  773. break
  774. case '接待记录':
  775. path = '../../static/images/function2.png'
  776. break
  777. case '销讲数据':
  778. path = '../../static/images/function4.png'
  779. break
  780. case '设备管理':
  781. path = '../../static/images/function5.png'
  782. break
  783. case '值班顾问':
  784. path = '../../static/images/function6.png'
  785. break
  786. case '顾问排名':
  787. path = '../../static/images/rankingguwen.png'
  788. break
  789. case '违禁记录':
  790. path = '../../static/images/prohibited.png'
  791. break
  792. }
  793. return path
  794. }
  795. }
  796. };
  797. </script>
  798. <style lang="scss" scoped>
  799. .update {
  800. width: 100%;
  801. height: 100%;
  802. background: rgba(0, 0, 0, 0.5);
  803. position: fixed;
  804. top: 0;
  805. left: 0;
  806. bottom: 0;
  807. right: 0;
  808. z-index: 9999;
  809. .updateBox {
  810. width: 80%;
  811. background: #FFFFFF;
  812. position: relative;
  813. left: 50%;
  814. margin-left: -40%;
  815. padding: 20rpx;
  816. border-radius: 10rpx;
  817. top: 140rpx;
  818. .top {
  819. width: 350rpx;
  820. height: 220rpx;
  821. margin: 0 auto;
  822. image {
  823. width: 100%;
  824. height: 100%;
  825. }
  826. }
  827. .btn {
  828. width: 510rpx;
  829. height: 88rpx;
  830. background: #2671E2;
  831. margin: 0 auto;
  832. display: flex;
  833. justify-content: center;
  834. align-items: center;
  835. font-size: 36rpx;
  836. border-radius: 8rpx;
  837. color: #FFFFFF;
  838. }
  839. .content {
  840. height: 268rpx;
  841. overflow-y: auto;
  842. margin: 46rpx 0;
  843. }
  844. .tit {
  845. font-size: 40rpx;
  846. text-align: center;
  847. font-weight: bold;
  848. }
  849. .close {
  850. position: absolute;
  851. bottom: -100rpx;
  852. left: 50%;
  853. margin-left: -50rpx;
  854. }
  855. }
  856. }
  857. .activecllasscet {
  858. font-size: 28rpx;
  859. font-weight: 400;
  860. color: #008ef2;
  861. }
  862. .cet {
  863. font-size: 28rpx;
  864. font-weight: 400;
  865. color: #333333;
  866. .cetview {
  867. margin-left: 20rpx;
  868. }
  869. }
  870. .cented-box {
  871. padding: 30rpx;
  872. background: #F8F8F8;
  873. width: 100%;
  874. height: 100%;
  875. }
  876. .Switchingbox {
  877. width: 100%;
  878. height: 44rpx;
  879. display: flex;
  880. align-items: center;
  881. .Switching1 {
  882. width: 44rpx;
  883. height: 44rpx;
  884. .Switching1-img {
  885. width: 44rpx;
  886. height: 44rpx;
  887. }
  888. }
  889. .Switching2 {
  890. margin-left: 12rpx;
  891. font-size: 32rpx;
  892. color: #303030;
  893. font-weight: 500;
  894. }
  895. .Switching3 {
  896. width: calc(100% - 280rpx);
  897. font-size: 32rpx;
  898. color: #303030;
  899. font-weight: 500;
  900. }
  901. .Switching4 {
  902. width: 112rpx;
  903. font-size: 28rpx;
  904. color: #303030;
  905. font-weight: 400;
  906. text-align: right;
  907. text-decoration: underline
  908. }
  909. }
  910. .Workcard {
  911. width: 100%;
  912. background: #FFFFFF;
  913. height: 154rpx;
  914. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  915. border-radius: 12rpx;
  916. display: flex;
  917. .Workcard-box {
  918. flex: 1;
  919. height: 100%;
  920. .Workcardimg {
  921. width: 100%;
  922. display: flex;
  923. justify-content: center;
  924. margin-top: 42rpx;
  925. .Workcardimg1 {
  926. width: 64rpx;
  927. height: 36rpx;
  928. background-image: url(../../static/images/battery.png);
  929. background-size: 100% 100%;
  930. padding: 8rpx;
  931. .bar {
  932. background-color: #43CD80;
  933. height: 100%;
  934. border-radius: 4rpx;
  935. }
  936. .bar1 {
  937. background-color: red;
  938. height: 100%;
  939. border-radius: 4rpx;
  940. }
  941. }
  942. .Workcardimg2 {
  943. width: 56rpx;
  944. height: 36rpx;
  945. }
  946. .Workcardimg3 {
  947. width: 34rpx;
  948. height: 36rpx;
  949. }
  950. .Workcardimg4 {
  951. width: 50rpx;
  952. height: 40rpx;
  953. }
  954. }
  955. .Workcardtext {
  956. width: 100%;
  957. text-align: center;
  958. font-size: 24rpx;
  959. font-weight: 400;
  960. color: #666666;
  961. margin-top: 20rpx;
  962. }
  963. }
  964. }
  965. .title {
  966. width: 100%;
  967. height: 30rpx;
  968. font-size: 30rpx;
  969. font-weight: 600;
  970. color: #333333;
  971. margin-top: 40rpx;
  972. margin-bottom: 24rpx;
  973. }
  974. .shebenbox {
  975. width: 100%;
  976. height: 156rpx;
  977. background: #FFFFFF;
  978. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  979. border-radius: 12rpx;
  980. display: flex;
  981. .shebenche {
  982. width: 25%;
  983. height: 100%;
  984. .shebenchenum {
  985. width: 100%;
  986. font-size: 36rpx;
  987. font-weight: 600;
  988. color: #333333;
  989. text-align: center;
  990. margin-top: 28rpx;
  991. }
  992. .shebenchetext {
  993. width: 100%;
  994. font-size: 24rpx;
  995. font-weight: 400;
  996. color: #666666;
  997. text-align: center;
  998. margin-top: 24rpx;
  999. }
  1000. }
  1001. }
  1002. .real-timebox {
  1003. width: 100%;
  1004. background: #FFFFFF;
  1005. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  1006. border-radius: 12rpx;
  1007. padding-bottom: 36rpx;
  1008. .timebox {
  1009. width: 100%;
  1010. display: flex;
  1011. .real {
  1012. flex: 1;
  1013. height: 100%;
  1014. .realnum {
  1015. width: 100%;
  1016. font-size: 36rpx;
  1017. font-weight: 600;
  1018. color: #333333;
  1019. text-align: center;
  1020. margin-top: 36rpx;
  1021. }
  1022. .realtext {
  1023. width: 100%;
  1024. font-size: 24rpx;
  1025. font-weight: 400;
  1026. color: #666666;
  1027. text-align: center;
  1028. margin-top: 24rpx;
  1029. }
  1030. }
  1031. }
  1032. }
  1033. .commonly-box {
  1034. width: 100%;
  1035. background: #FFFFFF;
  1036. box-shadow: 0px 0px 12px 0px rgba(224, 224, 224, 0.3);
  1037. border-radius: 12rpx;
  1038. display: flex;
  1039. flex-wrap: wrap;
  1040. padding-bottom: 36rpx;
  1041. .commonly {
  1042. width: 25%;
  1043. margin-top: 36rpx;
  1044. .commonly-img {
  1045. width: 100%;
  1046. height: 68rpx;
  1047. text-align: center;
  1048. .commonly-img1 {
  1049. width: 68rpx;
  1050. height: 68rpx;
  1051. border-radius: 50%;
  1052. }
  1053. }
  1054. .commonly-text {
  1055. width: 100%;
  1056. text-align: center;
  1057. font-size: 24rpx;
  1058. font-weight: 400;
  1059. color: #333333;
  1060. margin-top: 16rpx;
  1061. }
  1062. }
  1063. }
  1064. </style>