Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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