AI销管
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 34 KiB

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