HomeView.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <div class="container">
  3. <div class="header">
  4. <div class="top">
  5. <div class="left">
  6. <span class="left1">
  7. <img src="../assets/img/nav-index.jpg" alt="" />
  8. </span>
  9. <span class="left2">
  10. <img src="../assets/img/luzhougongan.png" alt="" />
  11. </span>
  12. </div>
  13. <el-menu
  14. :default-active="activeIndex"
  15. class="el-menu-demo"
  16. mode="horizontal"
  17. @select="handleSelect"
  18. text-color="#006C9AFF"
  19. active-text-color="#51CFFEFF"
  20. background-color="transparent"
  21. router
  22. :stroke-width=15
  23. >
  24. <el-menu-item index="/home/page">
  25. <span class="nav1">
  26. <img
  27. :src="
  28. srcIndex == '/home/page'
  29. ? icoUrl[0]['home1']
  30. : icoUrl[0]['home2']
  31. "
  32. /> </span
  33. >首页
  34. </el-menu-item>
  35. <el-menu-item index="/home/retrieval">
  36. <span class="nav1">
  37. <img :src="
  38. srcIndex == '/home/retrieval'
  39. ?icoUrl[1]['search1']
  40. :icoUrl[1]['search2']
  41. " />
  42. </span
  43. >快速检索
  44. </el-menu-item>
  45. <el-submenu index="2">
  46. <template slot="title">
  47. <span class="nav1">
  48. <img :src="
  49. srcIndex=='2'
  50. ?icoUrl[2]['doc1']
  51. :icoUrl[2]['doc2']
  52. " />
  53. </span
  54. >文档管理
  55. </template>
  56. <el-menu-item index="/home/file/part" >部门文档</el-menu-item>
  57. <el-menu-item index="/home/file/publi" >公共文档</el-menu-item>
  58. <el-menu-item index="/home/file/Storage" >分组文档</el-menu-item>
  59. <el-menu-item index="/home/file/individual" >个人文档</el-menu-item>
  60. <el-menu-item index="/home/file/set" >文档设置</el-menu-item>
  61. <el-menu-item index="/home/file/level" >文档级别</el-menu-item>
  62. <el-menu-item index="/home/file/demand" >扩容申请</el-menu-item>
  63. </el-submenu>
  64. <el-submenu index="3">
  65. <template slot="title">
  66. <span class="nav1">
  67. <img :src="
  68. srcIndex=='3'
  69. ?icoUrl[3]['person1']
  70. :icoUrl[3]['person2']
  71. " />
  72. <!-- <img src="../assets/img/nav-person1.png"> --> </span
  73. >个人设置
  74. </template>
  75. <el-menu-item index="/home/personal/Partspace"
  76. >部门存储空间</el-menu-item
  77. >
  78. <el-menu-item index="/home/personal/Publispace"
  79. >公共存储空间</el-menu-item
  80. >
  81. <el-menu-item index="/home/personal/Storagespace"
  82. >分组存储空间</el-menu-item
  83. >
  84. <el-menu-item index="/home/personal/space"
  85. >个人存储空间</el-menu-item
  86. >
  87. <el-menu-item index="/home/personal/classify"
  88. >个人文档分类</el-menu-item
  89. >
  90. <el-menu-item index="/home/personal/modify"
  91. >登录密码修改</el-menu-item
  92. >
  93. </el-submenu>
  94. <el-submenu index="4">
  95. <template slot="title">
  96. <span class="nav1">
  97. <img :src="
  98. srcIndex=='4'
  99. ?icoUrl[4]['search1']
  100. :icoUrl[4]['search2']
  101. " />
  102. </span
  103. >系统管理
  104. </template>
  105. <el-menu-item index="/home/system/user">用户管理</el-menu-item>
  106. <el-menu-item index="/home/system/role">角色管理</el-menu-item>
  107. <el-menu-item index="/home/system/menu">菜单管理</el-menu-item>
  108. <el-menu-item index="/home/system/department"
  109. >部门管理</el-menu-item
  110. >
  111. <el-menu-item index="/home/system/post">岗位管理</el-menu-item>
  112. <el-menu-item index="/home/system/dictionary"
  113. >字典管理</el-menu-item
  114. >
  115. <el-menu-item index="/home/system/parameter">参数管理</el-menu-item>
  116. <el-menu-item index="/home/system/notice">通知公告</el-menu-item>
  117. <el-submenu index="2-4">
  118. <template slot="title">日志管理</template>
  119. <el-menu-item index="/home/system/journal/operation"
  120. >操作日志</el-menu-item
  121. >
  122. <el-menu-item index="/home/system/journal/register"
  123. >登录日志</el-menu-item
  124. >
  125. </el-submenu>
  126. </el-submenu>
  127. <el-submenu index="5">
  128. <template slot="title">
  129. <span class="nav1">
  130. <img :src="
  131. srcIndex=='5'
  132. ?icoUrl[5]['group1']
  133. :icoUrl[5]['group2']
  134. " />
  135. </span
  136. >分组管理
  137. </template>
  138. <el-menu-item index="/home/group/groups">分组</el-menu-item>
  139. </el-submenu>
  140. </el-menu>
  141. <div class="right">
  142. <!-- <span class="right_1">
  143. <img src="../assets/img/2.jpg" />
  144. </span> -->
  145. <span class="right_2">孙芳</span>
  146. <div class="right_3"></div>
  147. <span class="right_4">
  148. <img src="../assets/img/exit.png" @click="exit()"/>
  149. </span>
  150. </div>
  151. </div>
  152. <div class="bottom"></div>
  153. </div>
  154. <div class="main">
  155. <router-view></router-view>
  156. </div>
  157. </div>
  158. </template>
  159. <script>
  160. // import page from "./Page/PageView";
  161. // import retrieval from "./Retrieval/RetrievalView";
  162. // import file from "./File/FileView";
  163. // import personal from "./Personal/PersonalView";
  164. // import system from "./System/SystemView";
  165. export default {
  166. data() {
  167. return {
  168. activeIndex: '',
  169. srcIndex: '',
  170. // username:this.$store.username,
  171. // 图片数组
  172. icoUrl:
  173. [
  174. {
  175. home1: require("../assets/img/nav-home1.png"),
  176. home2: require("../assets/img/nav-home.png"),
  177. },
  178. {
  179. search1: require('../assets/img/nav-search1.png'),
  180. search2: require('../assets/img/nav-search.png'),
  181. },
  182. {
  183. doc1: require('../assets/img/nav-doc1.png'),
  184. doc2: require('../assets/img/nav-doc.png'),
  185. },
  186. {
  187. person1: require('../assets/img/nav-person1.png'),
  188. person2: require('../assets/img/nav-person.png'),
  189. },
  190. {
  191. search1: require('../assets/img/nav-setting1.png'),
  192. search2: require('../assets/img/nav-setting.png'),
  193. },
  194. {
  195. group1: require('../assets/img/nav-group1.png'),
  196. group2: require('../assets/img/nav-group.png'),
  197. }
  198. ],
  199. };
  200. },
  201. // components: {
  202. // page,
  203. // retrieval,
  204. // file,
  205. // personal,
  206. // system
  207. // },
  208. created(){
  209. // console.log(this.$cache.local.get('USERNAME')) // 输出'local value'
  210. },
  211. methods: {
  212. handleSelect(key, keyPath) {
  213. this.srcIndex = keyPath[0];
  214. // console.log(this.srcIndex,keyPath);
  215. // console.log(key);
  216. },
  217. exit(){
  218. alert('你确定要注销界面吗?')
  219. this.$router.push('/login1')
  220. },
  221. },
  222. };
  223. </script>
  224. <style scoped lang='scss'>
  225. .container {
  226. background: #0c0827ff;
  227. background-size: 100% 100%;
  228. width: 100%;
  229. height: 100%;
  230. .header {
  231. height: calc(100vh * (70 / 1080));
  232. width: 100%;
  233. padding-top: calc(100vh * (10 / 1080));
  234. // 顶部板块
  235. .top {
  236. height: calc(100vh * (40 / 1080));
  237. width: 100%;
  238. padding-right: calc(100vh * (17 / 1920));
  239. padding-left: calc(100vh * (55 / 1920));
  240. display: flex;
  241. //顶部左边板块
  242. .left {
  243. width: calc(100vw * (369 / 1920));
  244. height: calc(100vh * (40 / 1080));
  245. display: flex;
  246. .left1 {
  247. width: calc(100vw * (28 / 1920));
  248. height: calc(100vh * (30 / 1080));
  249. margin-top: calc(100vh * (8 / 1080));
  250. img {
  251. width: calc(100vw * (28 / 1920));
  252. height: calc(100vh * (30 / 1080));
  253. }
  254. }
  255. .left2 {
  256. width: calc(100vw * (295 / 1920));
  257. height: calc(100vh * (32 / 1080));
  258. margin-left: calc(100vw * (10 / 1920));
  259. margin-top: calc(100vw * (5 / 1080));
  260. img {
  261. width: calc(100vw * (295 / 1920));
  262. height: calc(100vh * (32 / 1080));
  263. }
  264. }
  265. }
  266. // 顶部中间板块
  267. .el-menu-demo {
  268. width: calc(100vw * (1000 / 1920));
  269. margin-left: calc(100vw * (280 / 1920));
  270. padding-bottom: calc(100vh * (8 / 1080));
  271. border: none;
  272. display: flex;
  273. li {
  274. height: calc(100vh * (40 / 1080));
  275. line-height: calc(100vh * (40 / 1080));
  276. margin-right: calc(100vw * (60 / 1920));
  277. :hover{
  278. background: #1E497CFF !important;
  279. }
  280. }
  281. .nav1 > img {
  282. width: calc(100vw * (24 / 1920));
  283. height: calc(100vh * (24 / 1080));
  284. margin-bottom: calc(100vw * (5 / 1920));
  285. margin-right: calc(100vh * (5 / 1080));
  286. }
  287. }
  288. // 顶部右边板块
  289. .right {
  290. width: calc(100vw * (100 / 1920));
  291. height: calc(100vh * (40 / 1080));
  292. margin-left: calc(100vw * (140 / 1920));
  293. display: flex;
  294. justify-content: space-between;
  295. align-items: center;
  296. .right_1 > img {
  297. width: calc(100vw * (20 / 1920));
  298. height: calc(100vh * (20 / 1080));
  299. margin-right: calc(100vw * (5 / 1920));
  300. }
  301. .right_2 {
  302. font-size: 12px;
  303. color: white;
  304. }
  305. .right_3 {
  306. width: 1px;
  307. height: 13px;
  308. background: #02aac0;
  309. border-radius: 0px 0px 0px 0px;
  310. opacity: 1;
  311. }
  312. .right_4 > img {
  313. width: calc(100vw * (26 / 1920));
  314. height: calc(100vh * (26 / 1080));
  315. }
  316. }
  317. }
  318. //顶部下边图片板块
  319. .bottom {
  320. height: calc(100vh * (20 / 1080));
  321. width: 100%;
  322. background: url("../assets/img/nav-decorate.png");
  323. background-size: 100% calc(100vh * (20 / 1080));
  324. }
  325. }
  326. }
  327. ::v-deep .el-menu-item {
  328. padding: 0;
  329. padding-bottom: (100vh * (50 / 1080));
  330. }
  331. ::v-deep .el-submenu__title {
  332. padding: 0;
  333. padding-bottom: (100vh * (50 / 1080));
  334. }
  335. ::v-deep .el-menu--horizontal > .el-submenu .el-submenu__title {
  336. height: calc(100vh * (40 / 1080));
  337. line-height: calc(100vh * (40 / 1080));
  338. }
  339. ::v-deep li:hover{
  340. background: #1E497CFF !important;
  341. }
  342. ::v-deep .el-menu--horizontal .el-menu-item:not(.isdisabled):hover{
  343. background: #1E497CFF !important;
  344. }
  345. </style>
  346. <style>
  347. /* 下拉框 */
  348. .el-menu--horizontal .el-menu .el-menu-item{
  349. background: #0F1540FF !important;
  350. }
  351. .el-menu--horizontal .el-menu .el-menu-item:hover{
  352. background: #1E497CFF !important;
  353. color: #ffffff !important;
  354. }
  355. </style>