Navbar.vue 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403
  1. <template>
  2. <div class="navbar">
  3. <div class="pageTitle">{{ this.$route.meta.title }}</div>
  4. <!--收缩左侧菜单按钮-->
  5. <!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
  6. <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
  7. <!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" /> -->
  8. <div class="right-menu">
  9. <!--搜索,全屏,大小写转换和翻译-->
  10. <!-- <template v-if="device!=='mobile'">
  11. <search id="header-search" class="right-menu-item" />
  12. <error-log class="errLog-container right-menu-item hover-effect" />
  13. <screenfull id="screenfull" class="right-menu-item hover-effect" />
  14. <el-tooltip :content="$t('navbar.size')" effect="dark" placement="bottom">
  15. <size-select id="size-select" class="right-menu-item hover-effect" />
  16. </el-tooltip>
  17. <lang-select class="right-menu-item hover-effect" />
  18. </template> -->
  19. <div class="noticeIconBox">
  20. <img src="@/assets/public/nav/notice1.png" class="noticeIconImg" @click="showTabs = !showTabs" />
  21. <span class="unreadCount">{{ msg.count }}</span>
  22. <!-- <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" /> -->
  23. <div class="noticeTabsBox" v-if="showTabs" ref="noticeTabsBox">
  24. <div class="noticeTabsTitleBox">
  25. <img class="arrowLeft" src="@/assets/chat/left.png" @click="pages <= 1 ? pages = 1 : pages--"
  26. v-if="pages == 2">
  27. <div class="box1" v-show="pages == 1">
  28. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 1 }" @click="changeTabs(1)">
  29. <div class="noticeTabsItem">
  30. 资讯
  31. <span class="noticeMessageNew" v-if="msg.apply_articale.length > 0"></span>
  32. </div>
  33. </div>
  34. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 2 }" @click="changeTabs(2)">
  35. <div class="noticeTabsItem">
  36. 商品
  37. <span class="noticeMessageNew" v-if="msg.good.length > 0"></span>
  38. </div>
  39. </div>
  40. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 4 }" @click="changeTabs(4)">
  41. <div class="noticeTabsItem">
  42. 书刊
  43. <span class="noticeMessageNew" v-if="msg.book.length > 0"></span>
  44. </div>
  45. </div>
  46. <!-- <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 5 }" @click="changeTabs(5)">
  47. <div class="noticeTabsItem">
  48. 聊天
  49. <span class="noticeMessageNew" v-if="msg.chat.length > 0"></span>
  50. </div>
  51. </div> -->
  52. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 8 }" @click="changeTabs(8)">
  53. <div class="noticeTabsItem">
  54. 企业
  55. <span class="noticeMessageNew" v-if="msg.complany.length > 0"></span>
  56. </div>
  57. </div>
  58. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 9 }" @click="changeTabs(9)">
  59. <div class="noticeTabsItem">
  60. 项目
  61. <span class="noticeMessageNew" v-if="msg.project.length > 0"></span>
  62. </div>
  63. </div>
  64. </div>
  65. <div class="box2" v-show="pages == 2">
  66. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 3 }" @click="changeTabs(3)"
  67. v-if="userType == 10000 || userType == 1 || userType == 3">
  68. <div class="noticeTabsItem">
  69. 求职招聘
  70. <span class="noticeMessageNew"
  71. v-if="msg.job_hunting.length > 0 || msg.job_recruiting.length > 0 || msg.job_apply.length > 0 || msg.job_resume.length > 0">
  72. </span>
  73. </div>
  74. </div>
  75. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 6 }" @click="changeTabs(6)"
  76. v-if="userType == 10000 || userType == 2">
  77. <div class="noticeTabsItem">
  78. 通知
  79. <span class="noticeMessageNew" v-if="msg.notice.length > 0"></span>
  80. </div>
  81. </div>
  82. <div :class="{ 'noticeTabs': true, 'active': tabsIndex == 7 }" @click="changeTabs(7)"
  83. v-if="userType == 10000 || userType == 2">
  84. <div class="noticeTabsItem">
  85. 投诉
  86. <span class="noticeMessageNew"
  87. v-if="msg.complaint.length > 0 || msg.complaint_deal.length > 0"></span>
  88. </div>
  89. </div>
  90. </div>
  91. <img class="arrowRight" src="@/assets/chat/right.png" @click="pages >= 2 ? pages = 2 : pages++"
  92. v-if="pages == 1 && userType != 4">
  93. </div>
  94. <!-- 求职,招聘切换按钮 -->
  95. <div class="noticeTabsLine" v-if="tabsIndex == 3" style="height: 20px; margin: 0px; margin-top: -20px;">
  96. <ul class="noticeTabsLink">
  97. <li v-if="userType == 1">
  98. 求职
  99. </li>
  100. <li v-if="userType == 3">
  101. 招聘
  102. </li>
  103. </ul>
  104. <ul class="noticeTabsLink" v-if="userType == 10000">
  105. <li v-if="qiu" @click="changeJob(1)">
  106. 求职
  107. <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" />
  108. </li>
  109. <li v-if="zhao" @click="changeJob(2)">
  110. 招聘
  111. <img src="@/assets/public/nav/arrowDown.png" class="arrowDown" />
  112. </li>
  113. </ul>
  114. </div>
  115. <div class="noticeTabsLinkLine">
  116. <div v-if="userType == 10000">
  117. <div v-if="tabsIndex == 1" @click="goToPath(1, 0)">待审核列表</div>
  118. <div v-if="tabsIndex == 2" @click="goToPath(2, 0)">待审核列表</div>
  119. <div class="qiuFlex" v-if="tabsIndex == 3 && qiu == true && userType == 10000" @click="goToPath(3, 0)">
  120. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': qiu1 == true }" @mouseover="handleQiu(1)"
  121. @click="goToPath(3.1, 0)">待审核列表</span>
  122. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': qiu2 == true }" @mouseover="handleQiu(2)"
  123. @click="goToPath(3.2, 0)">职场机会</span>
  124. </div>
  125. <div class="qiuFlex" v-if="tabsIndex == 3 && zhao == true && userType == 10000" @click="goToPath(3, 0)">
  126. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': zhao1 == true }" @mouseover="handleQiu(3)"
  127. @click="goToPath(3.3, 0)">待审核列表</span>
  128. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': zhao2 == true }" @mouseover="handleQiu(4)"
  129. @click="goToPath(3.4, 0)">人才库</span>
  130. </div>
  131. <div v-if="tabsIndex == 4" @click="goToPath(4, 0)">待审核列表</div>
  132. <!-- 聊天 -->
  133. <div class="qiuFlex" v-if="tabsIndex == 5">
  134. <span style="cursor: default;" :class="{ 'qiuPillow': true, 'qiuPillowHover': single == true }"
  135. @mouseover="handleQiu(5)">单聊</span>
  136. <span style="cursor: default;" :class="{ 'qiuPillow': true, 'qiuPillowHover': group == true }"
  137. @mouseover="handleQiu(6)">群聊</span>
  138. </div>
  139. <!-- 通知 -->
  140. <div v-if="tabsIndex == 6" @click="goToPath(6, 0)">待审核列表</div>
  141. <!-- 投诉 -->
  142. <div v-if="tabsIndex == 7" @click="goToPath(7, 0)">待审核列表</div>
  143. <!-- 企业 -->
  144. <div v-if="tabsIndex == 8" @click="goToPath(8, 0)">待审核列表</div>
  145. <!-- 项目 -->
  146. <div v-if="tabsIndex == 9" @click="goToPath(9, 0)">待审核列表</div>
  147. </div>
  148. <div v-else>
  149. <div v-if="tabsIndex == 1" @click="goToPath(1, -1)">资讯列表</div>
  150. <div v-if="tabsIndex == 2" @click="goToPath(2, -1)">商品列表</div>
  151. <div v-if="tabsIndex == 3 && (userType == 2 || userType == 4)" @click="goToPath(3, -1)">求职招聘列表</div>
  152. <div class="qiuFlex" v-if="tabsIndex == 3 && qiu == true && userType == 1" @click="goToPath(3, 0)">
  153. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': qiu1 == true }" @mouseover="handleQiu(1)"
  154. @click="goToPath(3.1, -1)">求职列表</span>
  155. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': qiu2 == true }" @mouseover="handleQiu(2)"
  156. @click="goToPath(3.2, 0)">职场机会</span>
  157. </div>
  158. <div class="qiuFlex" v-if="tabsIndex == 3 && zhao == true && userType == 3" @click="goToPath(3, 0)">
  159. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': zhao1 == true }" @mouseover="handleQiu(3)"
  160. @click="goToPath(3.3, -1)">招聘列表</span>
  161. <span :class="{ 'qiuPillow': true, 'qiuPillowHover': zhao2 == true }" @mouseover="handleQiu(4)"
  162. @click="goToPath(3.4, 0)">人才库</span>
  163. </div>
  164. <div v-if="tabsIndex == 4" @click="goToPath(4, -1)">书刊列表</div>
  165. <!-- <div class="qiuFlex" v-if="tabsIndex == 5">
  166. <span style="cursor: default;" :class="{ 'qiuPillow': true, 'qiuPillowHover': single == true }"
  167. @mouseover="handleQiu(5)">单聊</span>
  168. <span style="cursor: default;" :class="{ 'qiuPillow': true, 'qiuPillowHover': group == true }"
  169. @mouseover="handleQiu(6)">群聊</span>
  170. </div> -->
  171. <!-- 通知 -->
  172. <div v-if="tabsIndex == 6" @click="goToPath(6.1, -1)">通知列表</div>
  173. <!-- <div class="qiuFlex" v-if="tabsIndex == 6 && userType == 2">
  174. <span @click="goToPath(6.1, -1)" :class="{ 'qiuPillow': true, 'qiuPillowHover': notice1 == true }"
  175. @mouseover="handleQiu(7)">通知列表</span>
  176. <span @click="goToPath(6.2, 0)" :class="{ 'qiuPillow': true, 'qiuPillowHover': notice2 == true }"
  177. @mouseover="handleQiu(8)">行政通知</span>
  178. </div> -->
  179. <!-- 投诉 -->
  180. <div class="qiuFlex" v-if="tabsIndex == 7 && userType == 2">
  181. <span @click="goToPath(7.1, -1)" :class="{ 'qiuPillow': true, 'qiuPillowHover': complaint1 == true }"
  182. @mouseover="handleQiu(9)">投诉列表</span>
  183. <span @click="goToPath(7.2, -1)" :class="{ 'qiuPillow': true, 'qiuPillowHover': complaint2 == true }"
  184. @mouseover="handleQiu(10)">待处理列表</span>
  185. <!-- <span @click="goToPath(7.3, -1)" :class="{ 'qiuPillow': true, 'qiuPillowHover': complaint3 == true }"
  186. @mouseover="handleQiu(11)">行政投诉</span> -->
  187. </div>
  188. <!-- 企业 -->
  189. <div v-if="tabsIndex == 8" @click="goToPath(8, -1)">企业列表</div>
  190. <!-- 项目 -->
  191. <div v-if="tabsIndex == 9" @click="goToPath(9, -1)">项目列表</div>
  192. </div>
  193. </div>
  194. <div class="infinite-list" v-infinite-scroll style="overflow:overlay">
  195. <!-- 资讯 -->
  196. <div class="noticeTabsDataBox" v-if="tabsIndex == 1">
  197. <div v-if="msg.apply_articale && msg.apply_articale.length > 0">
  198. <div class="noticeTabsDataItem" v-for="item in msg.apply_articale" :key="item.id"
  199. @click="goToPath(1, item.id)">
  200. <div class="noticeTabsDataItemImg">
  201. <img src="@/assets/public/nav/news.png">
  202. </div>
  203. <div class="noticeTabsDataItemContent">
  204. <div class="noticeNewsTitle">{{ item.title }}</div>
  205. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  206. </div>
  207. </div>
  208. </div>
  209. <div v-else class="noticeTabsDataItemEmpty">
  210. <div class="noticeEmpty">
  211. <img src="@/assets/public/nav/message-empty.png">
  212. </div>
  213. <div class="noticeEmptyText">
  214. 暂无消息
  215. </div>
  216. </div>
  217. </div>
  218. <!-- 商品 -->
  219. <div class="noticeTabsDataBox" v-if="tabsIndex == 2">
  220. <div v-if="msg.good && msg.good.length > 0">
  221. <div class="noticeTabsDataItem" v-for="item in msg.good" :key="item.id" @click="goToPath(2, item.id)">
  222. <div class="noticeTabsDataItemImg ">
  223. <img src="@/assets/public/nav/goods.png">
  224. </div>
  225. <div class="noticeTabsDataItemContent">
  226. <div class="noticeNewsTitle">{{ item.name }}</div>
  227. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  228. </div>
  229. </div>
  230. </div>
  231. <div v-else class="noticeTabsDataItemEmpty">
  232. <div class="noticeEmpty">
  233. <img src="@/assets/public/nav/message-empty.png">
  234. </div>
  235. <div class="noticeEmptyText">
  236. 暂无消息
  237. </div>
  238. </div>
  239. </div>
  240. <!-- 求职信息 待审核 -->
  241. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && qiu == true && qiu1 == true && userType == 10000">
  242. <div v-if="msg.job_hunting && msg.job_hunting.length > 0">
  243. <div class="noticeTabsDataItem" v-for="item in msg.job_hunting" :key="item.id"
  244. @click="goToPath(3.1, item.id)">
  245. <!-- 待审核求职 -->
  246. <div class="noticeTabsDataItemImg">
  247. <img src="@/assets/public/nav/job.png">
  248. </div>
  249. <div class="noticeTabsDataItemContent">
  250. <div class="noticeNewsTitle">{{ item.user_name + ':' + item.website_name + '-' + '发布求职信息了' }}</div>
  251. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  252. </div>
  253. </div>
  254. </div>
  255. <div v-else class="noticeTabsDataItemEmpty">
  256. <div class="noticeEmpty">
  257. <img src="@/assets/public/nav/message-empty.png">
  258. </div>
  259. <div class="noticeEmptyText">
  260. 暂无消息
  261. </div>
  262. </div>
  263. </div>
  264. <!-- 求职信息 职场机会 -->
  265. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && qiu == true && qiu2 == true && userType == 10000">
  266. <div v-if="msg.job_resume && msg.job_resume.length > 0">
  267. <div class="noticeTabsDataItem" v-for="item in msg.job_resume" :key="item.id"
  268. @click="goToPath(3.2, item.recruit_id)">
  269. <div class="noticeTabsDataItemImg">
  270. <img src="@/assets/public/nav/job.png">
  271. </div>
  272. <div class="noticeTabsDataItemContent">
  273. <div class="noticeNewsTitle">{{ item.business_name + ':' + item.website_name + ' ' + '关注了' +
  274. item.user_name
  275. + '的简历' }}</div>
  276. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  277. </div>
  278. </div>
  279. </div>
  280. <div v-else class="noticeTabsDataItemEmpty">
  281. <div class="noticeEmpty">
  282. <img src="@/assets/public/nav/message-empty.png">
  283. </div>
  284. <div class="noticeEmptyText">
  285. 暂无消息
  286. </div>
  287. </div>
  288. </div>
  289. <!-- 招聘信息 招聘信息 job_recruiting -->
  290. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && zhao == true && zhao1 == true && userType == 10000">
  291. <div v-if="msg.job_recruiting && msg.job_recruiting.length > 0">
  292. <div class="noticeTabsDataItem" v-for="item in msg.job_recruiting" :key="item.id"
  293. @click="goToPath(3.3, item.id)">
  294. <!-- 招聘信息 job_recruiting -->
  295. <div class="noticeTabsDataItemImg">
  296. <img src="@/assets/public/nav/job.png">
  297. </div>
  298. <div class="noticeTabsDataItemContent">
  299. <div class="noticeNewsTitle">{{ item.user_name + ':' + item.website_name + ' ' + '-' + item.title
  300. + '岗位' }}
  301. </div>
  302. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  303. </div>
  304. </div>
  305. </div>
  306. <div v-else class="noticeTabsDataItemEmpty">
  307. <div class="noticeEmpty">
  308. <img src="@/assets/public/nav/message-empty.png">
  309. </div>
  310. <div class="noticeEmptyText">
  311. 暂无消息
  312. </div>
  313. </div>
  314. </div>
  315. <!-- 招聘信息 人才库 job_apply -->
  316. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && zhao == true && zhao2 == true && userType == 10000">
  317. <div v-if="msg.job_apply && msg.job_apply.length > 0">
  318. <div class="noticeTabsDataItem" v-for="item in msg.job_apply" :key="item.id"
  319. @click="goToPath(3.4, item.hunt_id)">
  320. <!-- 人才库 job_apply -->
  321. <div class="noticeTabsDataItemImg">
  322. <img src="@/assets/public/nav/job.png">
  323. </div>
  324. <div class="noticeTabsDataItemContent">
  325. <div class="noticeNewsTitle">{{ item.user_name + ': 求职了' + '-' + item.business_name +
  326. '-' +
  327. item.job_name }}</div>
  328. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  329. </div>
  330. </div>
  331. </div>
  332. <div v-else class="noticeTabsDataItemEmpty">
  333. <div class="noticeEmpty">
  334. <img src="@/assets/public/nav/message-empty.png">
  335. </div>
  336. <div class="noticeEmptyText">
  337. 暂无消息
  338. </div>
  339. </div>
  340. </div>
  341. <!-- 求职信息 待审核 -->
  342. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && qiu == true && qiu1 == true && userType == 1">
  343. <div v-if="msg.job_hunting && msg.job_hunting.length > 0">
  344. <div class="noticeTabsDataItem" v-for="item in msg.job_hunting" :key="item.id"
  345. @click="goToPath(3.1, item.id)">
  346. <!-- 待审核求职 -->
  347. <div class="noticeTabsDataItemImg">
  348. <img src="@/assets/public/nav/job.png">
  349. </div>
  350. <div class="noticeTabsDataItemContent">
  351. <div class="noticeNewsTitle">{{ item.user_name + ':' + item.website_name + '-' + '发布求职信息了' }}</div>
  352. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  353. </div>
  354. </div>
  355. </div>
  356. <div v-else class="noticeTabsDataItemEmpty">
  357. <div class="noticeEmpty">
  358. <img src="@/assets/public/nav/message-empty.png">
  359. </div>
  360. <div class="noticeEmptyText">
  361. 暂无消息
  362. </div>
  363. </div>
  364. </div>
  365. <!-- 求职信息 职场机会 -->
  366. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && qiu == true && qiu2 == true && userType == 1">
  367. <div v-if="msg.job_resume && msg.job_resume.length > 0">
  368. <div class="noticeTabsDataItem" v-for="item in msg.job_resume" :key="item.id"
  369. @click="goToPath(3.2, item.recruit_id)">
  370. <div class="noticeTabsDataItemImg">
  371. <img src="@/assets/public/nav/message-news.png">
  372. </div>
  373. <div class="noticeTabsDataItemContent">
  374. <div class="noticeNewsTitle">{{ item.business_name + ':' + item.website_name + ' ' + '关注了' +
  375. item.user_name
  376. + '的简历' }}</div>
  377. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  378. </div>
  379. </div>
  380. </div>
  381. <div v-else class="noticeTabsDataItemEmpty">
  382. <div class="noticeEmpty">
  383. <img src="@/assets/public/nav/message-empty.png">
  384. </div>
  385. <div class="noticeEmptyText">
  386. 暂无消息
  387. </div>
  388. </div>
  389. </div>
  390. <!-- 招聘信息 招聘信息 job_recruiting -->
  391. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && zhao == true && zhao1 == true && userType == 3">
  392. <div v-if="msg.job_recruiting && msg.job_recruiting.length > 0">
  393. <div class="noticeTabsDataItem" v-for="item in msg.job_recruiting" :key="item.id"
  394. @click="goToPath(3.3, item.id)">
  395. <!-- 招聘信息 job_recruiting -->
  396. <div class="noticeTabsDataItemImg newsIcon">
  397. <img src="@/assets/public/nav/message-news.png">
  398. </div>
  399. <div class="noticeTabsDataItemContent">
  400. <div class="noticeNewsTitle">{{ item.user_name + ':' + item.website_name + ' ' + '-' + item.title
  401. + '岗位' }}
  402. </div>
  403. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  404. </div>
  405. </div>
  406. </div>
  407. <div v-else class="noticeTabsDataItemEmpty">
  408. <div class="noticeEmpty">
  409. <img src="@/assets/public/nav/message-empty.png">
  410. </div>
  411. <div class="noticeEmptyText">
  412. 暂无消息
  413. </div>
  414. </div>
  415. </div>
  416. <!-- 招聘信息 人才库 job_apply -->
  417. <div class="noticeTabsDataBox" v-if="tabsIndex == 3 && zhao == true && zhao2 == true && userType == 3">
  418. <div v-if="msg.job_apply && msg.job_apply.length > 0">
  419. <div class="noticeTabsDataItem" v-for="item in msg.job_apply" :key="item.id"
  420. @click="goToPath(3.4, item.hunt_id)">
  421. <!-- 人才库 job_apply -->
  422. <div class="noticeTabsDataItemImg">
  423. <img src="@/assets/public/nav/job.png">
  424. </div>
  425. <div class="noticeTabsDataItemContent">
  426. <div class="noticeNewsTitle">{{ item.user_name + ': 求职了' + '-' + item.business_name +
  427. '-' +
  428. item.job_name }}</div>
  429. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  430. </div>
  431. </div>
  432. </div>
  433. <div v-else class="noticeTabsDataItemEmpty">
  434. <div class="noticeEmpty">
  435. <img src="@/assets/public/nav/message-empty.png">
  436. </div>
  437. <div class="noticeEmptyText">
  438. 暂无消息
  439. </div>
  440. </div>
  441. </div>
  442. <!-- 书刊信息 -->
  443. <div class="noticeTabsDataBox" v-if="tabsIndex == 4">
  444. <div v-if="msg.book && msg.book.length > 0">
  445. <div class="noticeTabsDataItem" v-for="item in msg.book" :key="item.id" @click="goToPath(4, item.id)">
  446. <div class="noticeTabsDataItemImg ">
  447. <img src="@/assets/public/nav/book.png">
  448. </div>
  449. <div class="noticeTabsDataItemContent">
  450. <div class="noticeNewsTitle">{{ item.title }}</div>
  451. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  452. </div>
  453. </div>
  454. </div>
  455. <div v-else class="noticeTabsDataItemEmpty">
  456. <div class="noticeEmpty">
  457. <img src="@/assets/public/nav/message-empty.png">
  458. </div>
  459. <div class="noticeEmptyText">
  460. 暂无消息
  461. </div>
  462. </div>
  463. </div>
  464. <!-- 单聊 -->
  465. <!-- <div class="noticeTabsDataBox" v-if="tabsIndex == 5 && single == true && group == false">
  466. <div v-if="msg.chat && msg.chat.length > 0">
  467. <div class="noticeTabsDataItem" v-for="item in msg.chat" :key="item.id" @click="goToPath(5.1, 0)">
  468. <div class="noticeTabsDataItemImg chatIcon">
  469. <img src="@/assets/public/nav/single.png">
  470. </div>
  471. <div class="noticeTabsDataItemContent">
  472. <div class="noticeNewsTitle">{{ item.user_name + ':' + item.content }}</div>
  473. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  474. </div>
  475. </div>
  476. </div>
  477. <div v-else class="noticeTabsDataItemEmpty">
  478. <div class="noticeEmpty">
  479. <img src="@/assets/public/nav/message-empty.png">
  480. </div>
  481. <div class="noticeEmptyText">
  482. 暂无消息
  483. </div>
  484. </div>
  485. </div> -->
  486. <!-- 群聊 -->
  487. <!-- <div class="noticeTabsDataBox" v-if="tabsIndex == 5 && group == true && single == false">
  488. <div v-if="msg.chat_group && msg.chat_group.length > 0">
  489. <div class="noticeTabsDataItem" v-for="item in msg.chat_group" :key="item.id" @click="goToPath(5.2, 0)">
  490. <div class="noticeTabsDataItemImg chatIcon">
  491. <img src="@/assets/public/nav/single.png">
  492. </div>
  493. <div class="noticeTabsDataItemContent">
  494. <div class="noticeNewsTitle">{{ item.user_name + ':' + item.content }}</div>
  495. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  496. </div>
  497. </div>
  498. </div>
  499. <div v-else class="noticeTabsDataItemEmpty">
  500. <div class="noticeEmpty">
  501. <img src="@/assets/public/nav/message-empty.png">
  502. </div>
  503. <div class="noticeEmptyText">
  504. 暂无消息
  505. </div>
  506. </div>
  507. </div> -->
  508. <!-- 通知 -->
  509. <div class="noticeTabsDataBox" v-if="tabsIndex == 6 && notice1 == true && notice2 == false">
  510. <div v-if="msg.notice && msg.notice.length > 0">
  511. <div class="noticeTabsDataItem" v-for="item in msg.notice" :key="item.id" @click="goToPath(6, item.id)">
  512. <div class="noticeTabsDataItemImg ">
  513. <img src="@/assets/public/nav/notices.png">
  514. </div>
  515. <div class="noticeTabsDataItemContent">
  516. <div class="noticeNewsTitle">{{ item.title }}</div>
  517. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  518. </div>
  519. </div>
  520. </div>
  521. <div v-else class="noticeTabsDataItemEmpty">
  522. <div class="noticeEmpty">
  523. <img src="@/assets/public/nav/message-empty.png">
  524. </div>
  525. <div class="noticeEmptyText">
  526. 暂无消息
  527. </div>
  528. </div>
  529. </div>
  530. <!-- 行政通知 -->
  531. <!-- <div class="noticeTabsDataBox" v-if="tabsIndex == 6 && notice1 == true && notice2 == false">
  532. <div v-if="msg.notice && msg.notice.length > 0">
  533. <div class="noticeTabsDataItem" v-for="item in msg.notice" :key="item.id" @click="goToPath(6.1, item.id)">
  534. <div class="noticeTabsDataItemImg ">
  535. <img src="@/assets/public/nav/notices.png">
  536. </div>
  537. <div class="noticeTabsDataItemContent">
  538. <div class="noticeNewsTitle">{{ item.title }}</div>
  539. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  540. </div>
  541. </div>
  542. </div>
  543. <div v-else class="noticeTabsDataItemEmpty">
  544. <div class="noticeEmpty">
  545. <img src="@/assets/public/nav/message-empty.png">
  546. </div>
  547. <div class="noticeEmptyText">
  548. 暂无消息
  549. </div>
  550. </div>
  551. </div> -->
  552. <!-- 投诉 待审核列表 -->
  553. <div class="noticeTabsDataBox" v-if="tabsIndex == 7 && complaint1 == true && complaint2 == false">
  554. <div v-if="msg.complaint && msg.complaint.length > 0">
  555. <div class="noticeTabsDataItem" v-for="item in msg.complaint" :key="item.id"
  556. @click="goToPath(7, item.id)">
  557. <div class="noticeTabsDataItemImg">
  558. <img src="@/assets/public/nav/complaint.png">
  559. </div>
  560. <div class="noticeTabsDataItemContent">
  561. <div class="noticeNewsTitle">{{ item.title }}</div>
  562. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  563. </div>
  564. </div>
  565. </div>
  566. <div v-else class="noticeTabsDataItemEmpty">
  567. <div class="noticeEmpty">
  568. <img src="@/assets/public/nav/message-empty.png">
  569. </div>
  570. <div class="noticeEmptyText">
  571. 暂无消息
  572. </div>
  573. </div>
  574. </div>
  575. <div class="noticeTabsDataBox" v-if="tabsIndex == 7 && complaint1 == false && complaint2 == true">
  576. <div v-if="msg.complaint_deal && msg.complaint_deal.length > 0">
  577. <div class="noticeTabsDataItem" v-for="item in msg.complaint_deal" :key="item.id"
  578. @click="goToPath(7, item.id)">
  579. <div class="noticeTabsDataItemImg">
  580. <img src="@/assets/public/nav/complaint.png">
  581. </div>
  582. <div class="noticeTabsDataItemContent">
  583. <div class="noticeNewsTitle">{{ item.title }}</div>
  584. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  585. </div>
  586. </div>
  587. </div>
  588. <div v-else class="noticeTabsDataItemEmpty">
  589. <div class="noticeEmpty">
  590. <img src="@/assets/public/nav/message-empty.png">
  591. </div>
  592. <div class="noticeEmptyText">
  593. 暂无消息
  594. </div>
  595. </div>
  596. </div>
  597. <!-- 企业 -->
  598. <div class="noticeTabsDataBox" v-if="tabsIndex == 8">
  599. <div v-if="msg.complany && msg.complany.length > 0">
  600. <div class="noticeTabsDataItem" v-for="item in msg.complany" :key="item.id"
  601. @click="goToPath(8, item.id)">
  602. <div class="noticeTabsDataItemImg ">
  603. <img src="@/assets/public/nav/company.png">
  604. </div>
  605. <div class="noticeTabsDataItemContent">
  606. <div class="noticeNewsTitle">{{ item.title }}</div>
  607. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  608. </div>
  609. </div>
  610. </div>
  611. <div v-else class="noticeTabsDataItemEmpty">
  612. <div class="noticeEmpty">
  613. <img src="@/assets/public/nav/message-empty.png">
  614. </div>
  615. <div class="noticeEmptyText">
  616. 暂无消息
  617. </div>
  618. </div>
  619. </div>
  620. <!-- 项目 -->
  621. <div class="noticeTabsDataBox" v-if="tabsIndex == 9">
  622. <div v-if="msg.project && msg.project.length > 0">
  623. <div class="noticeTabsDataItem" v-for="item in msg.project" :key="item.id"
  624. @click="goToPath(9, item.id)">
  625. <div class="noticeTabsDataItemImg ">
  626. <img src="@/assets/public/nav/project.png">
  627. </div>
  628. <div class="noticeTabsDataItemContent">
  629. <div class="noticeNewsTitle">{{ item.title }}</div>
  630. <div class="noticeNewsTime">{{ item.updated_at }}</div>
  631. </div>
  632. </div>
  633. </div>
  634. <div v-else class="noticeTabsDataItemEmpty">
  635. <div class="noticeEmpty">
  636. <img src="@/assets/public/nav/message-empty.png">
  637. </div>
  638. <div class="noticeEmptyText">
  639. 暂无消息
  640. </div>
  641. </div>
  642. </div>
  643. </div>
  644. </div>
  645. </div>
  646. <!-- 用户头像和菜单 -->
  647. <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
  648. <div class="avatar-wrapper">
  649. <!-- <img src="@/assets/public/nav/notice.png" class="user-notice"> -->
  650. <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" v-if="avatar != ''">
  651. <img src="@/assets/login/userDefault.png" class="user-avatar" v-else>
  652. <span class="userName">{{ this.$store.state.user.name }}</span>
  653. <img src="@/assets/public/nav/arrowDown.png" class="arrowDown">
  654. <!--向下按钮-->
  655. <!-- <i class="el-icon-caret-bottom" /> -->
  656. </div>
  657. <el-dropdown-menu slot="dropdown">
  658. <router-link to="/profile/index">
  659. <div class="userMenuDownItem">
  660. <el-dropdown-item>
  661. <span style="display:block;">{{ $t('navbar.profile') }}</span>
  662. </el-dropdown-item>
  663. </div>
  664. </router-link>
  665. <!-- <router-link to="/">
  666. <el-dropdown-item>
  667. {{ $t('navbar.dashboard') }}
  668. </el-dropdown-item>
  669. </router-link>
  670. <a target="_blank" href="https://github.com/PanJiaChen/vue-element-admin/">
  671. <el-dropdown-item>
  672. {{ $t('navbar.github') }}
  673. </el-dropdown-item>
  674. </a>
  675. <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">
  676. <el-dropdown-item>Docs</el-dropdown-item>
  677. </a> -->
  678. <el-dropdown-item divided @click.native="logout">
  679. <div class="userMenuDownItem">
  680. <span style="display:block;">{{ $t('navbar.logOut') }}</span>
  681. <img src="@/assets/public/nav/Logout.png">
  682. </div>
  683. </el-dropdown-item>
  684. </el-dropdown-menu>
  685. </el-dropdown>
  686. </div>
  687. </div>
  688. </template>
  689. <script>
  690. import { mapGetters } from 'vuex'
  691. import Breadcrumb from '@/components/Breadcrumb'
  692. import Hamburger from '@/components/Hamburger'
  693. import ErrorLog from '@/components/ErrorLog'
  694. import Screenfull from '@/components/Screenfull'
  695. import SizeSelect from '@/components/SizeSelect'
  696. import LangSelect from '@/components/LangSelect'
  697. import Search from '@/components/HeaderSearch'
  698. import axios from 'axios';
  699. import router, { resetRouter } from '@/router'
  700. import BASEURL from '@/utils/baseUrl'
  701. import { getUseType, removeLoginStatus } from '@/utils/auth'
  702. export default {
  703. components: {
  704. Breadcrumb,
  705. Hamburger,
  706. ErrorLog,
  707. Screenfull,
  708. SizeSelect,
  709. LangSelect,
  710. Search
  711. },
  712. data() {
  713. return {
  714. msg: {},
  715. userType: '', //用户类型
  716. tabsIndex: 1, //显示哪个选项卡
  717. showTabs: false, //是否显示悬浮菜单
  718. //求职招聘
  719. qiu: false,
  720. zhao: true,
  721. qiu1: true,
  722. qiu2: false,
  723. zhao1: true,
  724. zhao2: false,
  725. pages: 1,
  726. single: true, //单聊
  727. group: false, //群聊
  728. notice1: true, //通知待审核列表
  729. notice2: false, //行政通知
  730. complaint1: true, //投诉待审核列表
  731. complaint2: false, //投诉待处理列表
  732. complaint3: false, //行政投诉
  733. }
  734. },
  735. computed: {
  736. ...mapGetters([
  737. 'sidebar',
  738. 'avatar',
  739. 'device'
  740. ]),
  741. },
  742. mounted() {
  743. this.getMsg();
  744. //获得用户类型
  745. this.userType = getUseType();
  746. if (this.userType == 1) {
  747. this.qiu = true;
  748. }
  749. // 添加点击事件监听器
  750. document.addEventListener('click', this.handleClickOutside);
  751. },
  752. beforeDestroy() {
  753. // 组件销毁前移除事件监听器
  754. document.removeEventListener('click', this.handleClickOutside);
  755. },
  756. methods: {
  757. //0.收缩菜单 start---------------------------------------->
  758. toggleSideBar() {
  759. this.$store.dispatch('app/toggleSideBar')
  760. },
  761. //0.收缩菜单 end---------------------------------------->
  762. //1.退出登录 start---------------------------------------->
  763. logout() {
  764. //获取 token
  765. const token = this.getTokenFromCookie();
  766. // 新做的,待替换
  767. // this.$store.dispatch('user/logoutapi', {token: token}).then(response => {
  768. // //重置访问过的路由
  769. // resetRouter()
  770. // dispatch('tagsView/delAllViews', null, { root: true })
  771. // console.log(response);
  772. // this.$store.commit("user/LOGOUT");
  773. // this.$router.push(`/login`);
  774. // }).catch(error => {
  775. // this.$store.commit("user/LOGOUT");
  776. // this.$router.push(`/login`);
  777. // });
  778. axios.get(BASEURL.WebCLogoutUrl, { params: { token: token } }).then(response => {
  779. console.log(response);
  780. this.$store.commit("user/LOGOUT");
  781. //this.$router.push(`/login`);
  782. //刷新页面
  783. window.location.reload();
  784. }).catch(error => {
  785. console.log(error);
  786. this.$store.commit("user/LOGOUT");
  787. //this.$router.push(`/login`);
  788. //this.$message.error(response.message);
  789. window.location.reload();
  790. });
  791. removeLoginStatus();
  792. },
  793. // async logout() {
  794. // await this.$store.dispatch('user/logout')
  795. // this.$router.push(`/login?redirect=${this.$route.fullPath}`)
  796. // },
  797. getTokenFromCookie() {
  798. const name = "Admin-Token=";
  799. const decodedCookie = decodeURIComponent(document.cookie);
  800. const cookieArray = decodedCookie.split(';');
  801. for (let i = 0; i < cookieArray.length; i++) {
  802. let cookie = cookieArray[i].trim();
  803. if (cookie.indexOf(name) === 0) {
  804. return cookie.substring(name.length, cookie.length); // 返回 token
  805. }
  806. }
  807. return ""; // 如果没有找到 token,返回空字符串
  808. },
  809. //1.退出登录 end---------------------------------------->
  810. //2.通知消息 start---------------------------------------->
  811. //2.1 获取通知消息列表
  812. getMsg() {
  813. this.$store.dispatch('news/getMSG').then(response => {
  814. console.log('response1111111111', response);
  815. this.msg = response.data;
  816. console.log('response1111111111msg', this.msg);
  817. }).catch(error => {
  818. console.log(error);
  819. });
  820. },
  821. //2.2 切换
  822. changeTabs(index) {
  823. this.tabsIndex = index;
  824. },
  825. //2.3跳转方法
  826. goToPath(type, id) {
  827. //如果id是0 跳转到列表
  828. if (id == 0) {
  829. if (type == 1) {
  830. this.$router.push(`/examine`);
  831. }
  832. else if (type == 2) {
  833. this.$router.push(`/goodListApply`);
  834. }
  835. else if (type == 3.1) { //求职 待审核
  836. this.$router.push(`/jobHuntingListApply`);
  837. }
  838. else if (type == 3.2) { // 职场机会
  839. this.$router.push(`/jobOpportunities`);
  840. }
  841. else if (type == 3.3) { // 招聘 待审核
  842. this.$router.push(`/checkjobRecruitingList`);
  843. }
  844. else if (type == 3.4) { // 人才库
  845. this.$router.push(`/jobHuntingApplyList`);
  846. }
  847. else if (type == 4) { //书刊 待审核
  848. this.$router.push(`/bookListApply`);
  849. }
  850. else if (type == 6) { //通知 待审核
  851. this.$router.push(`/noticeListApply`);
  852. }
  853. else if (type == 7) { //投诉 待审核
  854. this.$router.push(`/ncomplaintListApply`);
  855. }
  856. else if (type == 8) { //企业 待审核
  857. this.$router.push(`/checkcompanyList`);
  858. }
  859. else if (type == 9) { //项目 待审核
  860. this.$router.push(`/checkprojectList`);
  861. }
  862. } else if (id == -1) {
  863. if (type == 1) {
  864. this.$router.push(`/articleList`);
  865. }
  866. else if (type == 2) {
  867. this.$router.push(`/goodList`);
  868. }
  869. else if (type == 3) {
  870. this.$router.push(`/jobHuntingList`);
  871. }
  872. else if (type == 3.1) { //求职 待审核
  873. this.$router.push(`/jobHuntingList`);
  874. }
  875. else if (type == 3.2) { // 职场机会
  876. this.$router.push(`/jobOpportunities`);
  877. }
  878. else if (type == 3.3) { // 招聘 待审核
  879. this.$router.push(`/jobRecruitingList`);
  880. }
  881. else if (type == 3.4) { // 人才库
  882. this.$router.push(`/jobHuntingApplyList`);
  883. }
  884. else if (type == 4) { //书刊
  885. this.$router.push(`/bookList`);
  886. }
  887. else if (type == 6.1) { //通知
  888. this.$router.push(`/noticeList`);
  889. }
  890. else if (type == 7.1) { //投诉
  891. this.$router.push(`/ncomplaintList`);
  892. }
  893. else if (type == 7.2) { //投诉处理
  894. this.$router.push(`/ncomplaintListDeal`);
  895. }
  896. else if (type == 8) { //企业
  897. this.$router.push(`/companyList`);
  898. }
  899. else if (type == 9) { //项目
  900. this.$router.push(`/projectList`);
  901. }
  902. } else {
  903. if (type == 1) {
  904. this.$router.push(`/creatNews?id=${id}`);
  905. }
  906. else if (type == 2) {
  907. this.$router.push(`/addGood?id=${id}`);
  908. }
  909. else if (type == 3) {
  910. this.$router.push(`/addJobHunting?id=${id}`);
  911. }
  912. else if (type == 3.1) { //求职 待审核
  913. this.$router.push(`/addJobHunting?id=${id}`);
  914. }
  915. else if (type == 3.2) { // 职场机会
  916. this.$router.push(`/jobOpportunitiesDetails?id=${id}`);
  917. }
  918. else if (type == 3.3) { // 招聘 待审核
  919. this.$router.push(`/creatJob?id=${id}&to=checkjob`);
  920. }
  921. else if (type == 3.4) { // 人才库
  922. this.$router.push(`/jobHuntingApplyDetil?id=${id}`);
  923. }
  924. else if (type == 4) { //书刊
  925. this.$router.push(`/addBook?id=${id}`);
  926. }
  927. else if (type == 6) { //通知
  928. this.$router.push(`/addNotice?id=${id}`);
  929. }
  930. else if (type == 7) { //投诉
  931. this.$router.push(`/addNcomplaint?id=${id}`);
  932. }
  933. else if (type == 7.1) { //投诉处理
  934. this.$router.push(`/addNComplaint?id=${id}&read=1`);
  935. }
  936. else if (type == 8) { //企业
  937. this.$router.push(`/creatCompany?id=${id}&to=checkCompany`);
  938. }
  939. else if (type == 9) { //项目
  940. this.$router.push(`/creatProject?id=${id}&to=checkProject`);
  941. }
  942. }
  943. this.showTabs = false;
  944. },
  945. // 添加处理点击外部的方法
  946. handleClickOutside(event) {
  947. const noticeTabsBox = this.$refs.noticeTabsBox;
  948. const noticeIconImg = event.target.closest('.noticeIconImg');
  949. // 如果点击的不是通知图标,并且点击的区域不在通知框内,则关闭通知框
  950. if (!noticeIconImg && noticeTabsBox && !noticeTabsBox.contains(event.target)) {
  951. this.showTabs = false;
  952. }
  953. },
  954. //2.通知消息 end---------------------------------------->
  955. changeJob(index) {
  956. if (index == 1) {
  957. this.qiu = false;
  958. this.zhao = true;
  959. } else if (index == 2) {
  960. this.qiu = true;
  961. this.zhao = false;
  962. }
  963. },
  964. handleQiu(index) {
  965. if (index == 1) { //求职招聘
  966. this.qiu1 = true;
  967. this.qiu2 = false;
  968. } else if (index == 2) {
  969. this.qiu1 = false;
  970. this.qiu2 = true;
  971. } else if (index == 3) {
  972. this.zhao1 = true;
  973. this.zhao2 = false;
  974. } else if (index == 4) {
  975. this.zhao1 = false;
  976. this.zhao2 = true;
  977. } else if (index == 5) { //聊天部分
  978. this.single = true;
  979. this.group = false;
  980. } else if (index == 6) {
  981. this.single = false;
  982. this.group = true;
  983. } else if (index == 7) { //通知
  984. this.notice1 = true;
  985. this.notice2 = false;
  986. } else if (index == 8) {
  987. this.notice1 = false;
  988. this.notice2 = true;
  989. } else if (index == 9) { //投诉
  990. this.complaint1 = true;
  991. this.complaint2 = false;
  992. } else if (index == 10) {
  993. this.complaint1 = false;
  994. this.complaint2 = true;
  995. } else if (index == 11) {
  996. this.complaint1 = false;
  997. this.complaint2 = false;
  998. this.complaint3 = true;
  999. }
  1000. }
  1001. }
  1002. }
  1003. </script>
  1004. <style lang="scss" scoped>
  1005. .navbar {
  1006. height: 60px;
  1007. position: relative;
  1008. display: flex;
  1009. align-items: center;
  1010. justify-content: space-between;
  1011. background: #fff;
  1012. // box-shadow: 0 1px 4px rgba(0,21,41,.08);
  1013. border-bottom: 1px solid #E9EDF7;
  1014. .pageTitle {
  1015. font-size: 20px;
  1016. font-weight: bold;
  1017. padding-left: 30px;
  1018. color: #45464E;
  1019. }
  1020. .userName {
  1021. font-size: 14px;
  1022. color: #1C1D22;
  1023. margin-left: 10px;
  1024. font-weight: bold;
  1025. }
  1026. .hamburger-container {
  1027. line-height: 46px;
  1028. height: 100%;
  1029. float: left;
  1030. cursor: pointer;
  1031. transition: background .3s;
  1032. -webkit-tap-highlight-color: transparent;
  1033. &:hover {
  1034. background: rgba(0, 0, 0, .025)
  1035. }
  1036. }
  1037. .breadcrumb-container {
  1038. float: left;
  1039. }
  1040. .errLog-container {
  1041. display: inline-block;
  1042. vertical-align: top;
  1043. }
  1044. .right-menu {
  1045. float: right;
  1046. height: 100%;
  1047. line-height: 50px;
  1048. display: flex;
  1049. align-items: center;
  1050. position: relative;
  1051. &:focus {
  1052. outline: none;
  1053. }
  1054. .right-menu-item {
  1055. display: inline-block;
  1056. padding: 0 8px;
  1057. height: 100%;
  1058. font-size: 18px;
  1059. color: #5a5e66;
  1060. vertical-align: text-bottom;
  1061. &.hover-effect {
  1062. cursor: pointer;
  1063. transition: background .3s;
  1064. &:hover {
  1065. background: rgba(0, 0, 0, .025)
  1066. }
  1067. }
  1068. }
  1069. .avatar-container {
  1070. margin-right: 30px;
  1071. .avatar-wrapper {
  1072. margin-top: 5px;
  1073. display: flex;
  1074. align-items: center;
  1075. .user-avatar {
  1076. cursor: pointer;
  1077. width: 32px;
  1078. height: 32px;
  1079. }
  1080. .arrowDown {
  1081. width: 12px;
  1082. height: 8px;
  1083. margin-left: 10px;
  1084. }
  1085. .user-notice {
  1086. width: 20px;
  1087. height: 20px;
  1088. margin-right: 20px;
  1089. }
  1090. .el-icon-caret-bottom {
  1091. cursor: pointer;
  1092. position: absolute;
  1093. right: -20px;
  1094. top: 25px;
  1095. font-size: 12px;
  1096. }
  1097. }
  1098. }
  1099. //通知消息 图标
  1100. .noticeIconBox {
  1101. width: 55px;
  1102. height: 50px;
  1103. box-sizing: border-box;
  1104. padding-top: 8px;
  1105. position: relative;
  1106. .noticeIconImg {
  1107. width: 34px;
  1108. height: 34px;
  1109. cursor: pointer;
  1110. }
  1111. .unreadCount {
  1112. position: absolute;
  1113. top: 5px;
  1114. right: 8px;
  1115. width: 30px;
  1116. height: 20px;
  1117. background: #FF4E4E;
  1118. font-size: 12px;
  1119. line-height: 20px;
  1120. text-align: center;
  1121. color: #fff;
  1122. border-radius: 23px;
  1123. }
  1124. //通知消息 悬浮菜单
  1125. .noticeTabsBox {
  1126. position: absolute;
  1127. width: 380px;
  1128. height: 640px;
  1129. border-radius: 8px;
  1130. background: #fff;
  1131. z-index: 999;
  1132. right: 20px;
  1133. top: 50px;
  1134. box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.15);
  1135. padding: 25px 20px;
  1136. box-sizing: border-box;
  1137. .noticeTabsTitleBox {
  1138. display: flex;
  1139. // align-items: center;
  1140. border-bottom: 1px solid #E9EDF7;
  1141. position: relative;
  1142. margin-left: 15px;
  1143. margin-right: 10px;
  1144. .arrowRight {
  1145. width: 24px;
  1146. height: 24px;
  1147. position: absolute;
  1148. right: -20px;
  1149. top: 0;
  1150. cursor: pointer;
  1151. }
  1152. .arrowLeft {
  1153. width: 24px;
  1154. height: 24px;
  1155. position: absolute;
  1156. left: -30px;
  1157. top: 0;
  1158. cursor: pointer;
  1159. }
  1160. .box1,
  1161. .box2 {
  1162. display: flex;
  1163. }
  1164. .noticeTabs {
  1165. height: 41px;
  1166. border-bottom: 2px solid #fff;
  1167. margin-right: 30px;
  1168. display: flex;
  1169. cursor: pointer;
  1170. .noticeTabsItem {
  1171. height: 20px;
  1172. line-height: 20px;
  1173. font-size: 16px;
  1174. position: relative;
  1175. .noticeMessageNew {
  1176. width: 5px;
  1177. height: 5px;
  1178. border-radius: 50%;
  1179. background: #FF4E4E;
  1180. position: absolute;
  1181. right: -5px;
  1182. top: 0;
  1183. }
  1184. }
  1185. }
  1186. .active {
  1187. border-bottom: 2px solid #5570F1;
  1188. }
  1189. }
  1190. .noticeTabsLinkLine {
  1191. height: 38px;
  1192. box-sizing: border-box;
  1193. font-size: 14px;
  1194. cursor: pointer;
  1195. background: #F5F7FB;
  1196. border: 1px solid #E3E8FA;
  1197. text-align: center;
  1198. line-height: 38px;
  1199. border-radius: 8px;
  1200. margin: 20px 0;
  1201. }
  1202. .noticeTabsDataBox {
  1203. height: 470px;
  1204. .noticeTabsDataItem {
  1205. display: flex;
  1206. align-items: flex-start;
  1207. cursor: pointer;
  1208. border-radius: 8px;
  1209. box-sizing: border-box;
  1210. padding: 5px 10px;
  1211. &:hover {
  1212. background: #F5F7FB;
  1213. }
  1214. height: 95px;
  1215. .noticeTabsDataItemImg {
  1216. border-radius: 50%;
  1217. width: 26px;
  1218. height: 26px;
  1219. display: flex;
  1220. align-items: center;
  1221. justify-content: center;
  1222. margin-right: 15px;
  1223. margin-top: 6px;
  1224. }
  1225. .newsIcon {
  1226. background: #BAC5F8;
  1227. }
  1228. .chatIcon {
  1229. background: #dbe8e3;
  1230. }
  1231. .noticeTabsDataItemContent {
  1232. flex: 1;
  1233. .noticeNewsTitle {
  1234. font-size: 14px;
  1235. line-height: 28px;
  1236. height: 56px;
  1237. color: #333;
  1238. overflow: hidden;
  1239. text-overflow: ellipsis;
  1240. display: -webkit-box;
  1241. -webkit-line-clamp: 2;
  1242. -webkit-box-orient: vertical;
  1243. }
  1244. .noticeNewsTime {
  1245. height: 30px;
  1246. line-height: 30px;
  1247. font-size: 14px;
  1248. color: #999;
  1249. }
  1250. }
  1251. }
  1252. .noticeTabsDataItemEmpty {
  1253. .noticeEmpty {
  1254. text-align: center;
  1255. padding-top: 150px;
  1256. box-sizing: border-box;
  1257. }
  1258. .noticeEmptyText {
  1259. text-align: center;
  1260. color: #999;
  1261. font-size: 14px;
  1262. }
  1263. }
  1264. }
  1265. }
  1266. }
  1267. }
  1268. }
  1269. .userMenuDownItem {
  1270. width: 100px;
  1271. display: flex;
  1272. align-items: center;
  1273. justify-content: space-between;
  1274. }
  1275. .el-dropdown-menu__item:not(.is-disabled):hover {
  1276. background: none;
  1277. color: #606266;
  1278. }
  1279. .unread-count {
  1280. position: relative;
  1281. display: inline-block;
  1282. width: 20px;
  1283. height: 20px;
  1284. border-radius: 50%;
  1285. background-color: red;
  1286. color: white;
  1287. font-size: 12px;
  1288. text-align: center;
  1289. line-height: 20px;
  1290. margin-left: -40px;
  1291. margin-top: -20px;
  1292. /* 调整位置,使其贴合通知图标 */
  1293. }
  1294. /* 如果未读数量为 0,则隐藏角标 */
  1295. .unread-count:empty {
  1296. display: none;
  1297. }
  1298. .noticeTabsLink {
  1299. padding-left: 10px;
  1300. // 去掉圆点
  1301. list-style: none;
  1302. }
  1303. .qiuPillow {
  1304. border-radius: 4px;
  1305. padding: -1px;
  1306. width: 48%;
  1307. height: 36px;
  1308. display: block;
  1309. }
  1310. .qiuPillowHover {
  1311. border-radius: 4px;
  1312. padding: -1px;
  1313. width: 48%;
  1314. height: 36px;
  1315. background: #dfe9ee;
  1316. border: #dfe1e7 1px solid;
  1317. }
  1318. .qiuFlex {
  1319. display: flex;
  1320. justify-content: space-between;
  1321. text-align: center;
  1322. }
  1323. </style>