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.
 
 
 

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