HomeView.vue 10 KB

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