AI销管
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

index.vue 32 KiB

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