Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

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