Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.vue 28 KiB

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