manageMain.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290
  1. <template>
  2. <el-container style="height: 100vh; overflow: hidden">
  3. <el-aside style="width: auto; overflow: hidden">
  4. <el-menu
  5. :unique-opened="true"
  6. ref="menu"
  7. :collapse-transition="false"
  8. class="el-menu-vertical-demo shadow-menu aside-menu"
  9. :router="true"
  10. :default-active="active"
  11. :collapse="isCollapse"
  12. text-color="#333"
  13. active-text-color="#fff"
  14. @select="selectMenu"
  15. >
  16. <!-- <img src="../../assets/img/commons/jhTop.png" /> -->
  17. <!-- <img
  18. v-show="!isCollapse"
  19. style="
  20. height: 40px;
  21. width: auto;
  22. padding-top: 20px;
  23. padding-left: 10px;
  24. padding-right: 10px;
  25. margin-bottom: 20px;
  26. "
  27. src="../../assets/img/commons/jhTop1.png"
  28. /> -->
  29. <!-- <p class="aac">郑大计智</p>
  30. <p class="aac">心理测评系统</p> -->
  31. <div
  32. class="aac"
  33. style="
  34. display: flex;
  35. flex-direction: column;
  36. justify-content: center;
  37. align-items: center;
  38. "
  39. >
  40. <div>郑大计智</div>
  41. <div>心理测评系统</div>
  42. </div>
  43. <!-- <p class="aab"></p> -->
  44. <!-- <img
  45. v-show="!isCollapse"
  46. style="
  47. height: 40px;
  48. width: auto;
  49. padding-top: 20px;
  50. padding-left: 10px;
  51. padding-right: 10px;
  52. margin-bottom: 20px;
  53. "
  54. src="../../assets/img/commons/jhTop1.png"
  55. /> -->
  56. <img
  57. v-show="isCollapse"
  58. style="menu_top_suo"
  59. src="../../assets/img/commons/jhTopSuo.png"
  60. />
  61. <div v-for="item in menuList" :key="item.id">
  62. <el-menu-item :index="item.path" v-if="!item.hasOwnProperty('child')"
  63. ><div class="menu_icon_mm">
  64. <img :src="item.icon" class="menu_icon_img" /><span>{{ item.name }}</span>
  65. </div></el-menu-item
  66. >
  67. <div v-if="item.hasOwnProperty('child')">
  68. <!-- v-for="item in menuList"
  69. :key="item.id"
  70. :index="item.path"
  71. v-show="item.showItem" -->
  72. <el-submenu :index="item.path">
  73. <template slot="title">
  74. <div class="menu_icon_mm">
  75. <img :src="item.icon" class="menu_icon_img" />
  76. <span class="menu_name">{{ item.name }}</span>
  77. </div>
  78. </template>
  79. <el-menu-item-group style="background-color: #000000">
  80. <el-menu-item v-for="el in item.child" :key="el.id" :index="el.path">
  81. <span class="menu_sub_tt"
  82. ><span class="menu_sub_t1">&nbsp;</span>{{ el.name }}</span
  83. >
  84. </el-menu-item>
  85. </el-menu-item-group>
  86. </el-submenu>
  87. </div>
  88. </div>
  89. <!-- <el-menu-item index="1">用户管理</el-menu-item> -->
  90. </el-menu>
  91. </el-aside>
  92. <!-- style="height:100vh; display: flex; flex-direction: column; border-top-left-radius: 40px; border-bottom-left-radius: 40px;background-color:#000000" -->
  93. <el-container class="el-container-com">
  94. <el-header
  95. class="shadow-menu"
  96. style="
  97. background-color: #ffffff;
  98. border-top-left-radius: 40px;
  99. background-color: #f7f7f7;
  100. "
  101. >
  102. <el-row class="admin-header-content">
  103. <el-col :span="12">
  104. <el-row>
  105. <el-col :span="10">
  106. <div class="main_top_1">
  107. <div class="blue">&nbsp;&nbsp;</div>
  108. <el-breadcrumb class="admin-breadcrumb" separator=">>">
  109. <el-breadcrumb-item>{{ crumbParent }}</el-breadcrumb-item>
  110. <el-breadcrumb-item
  111. style="font-weight: 700"
  112. v-if="crumbChild && crumbChild != null"
  113. >{{ crumbChild }}</el-breadcrumb-item
  114. >
  115. </el-breadcrumb>
  116. </div>
  117. </el-col>
  118. </el-row>
  119. </el-col>
  120. <el-col :span="12" class="just-right">
  121. <div style="display: flex; align-items: center; margin-right: 20px">
  122. <img v-show="isFullscreen" src="../../assets/img/home/suo.png" alt="" style='cursor:pointer;width:20px' @click='fullScreenFun'>
  123. <img v-show="!isFullscreen" src="../../assets/img/home/quan.png" alt="" style='cursor:pointer;width:20px' @click='fullScreenFun'>
  124. </div>
  125. <div class="user_out" @mouseenter="mouseenterFun" @mouseleave="mouseLeaveFun">
  126. <img class="user_out_img" src="../../assets/menu/userAdmin.png" />
  127. <div class="user_out_des">{{ userInfo.userName }}老师</div>
  128. <div v-if="isShowMenu" class="user_out_ab">
  129. <div class="exit" @click="escape()">退出</div>
  130. <div class="update_pass" @click="changePwd()">修改密码</div>
  131. </div>
  132. </div>
  133. <!-- <vue-qr
  134. v-show="false"
  135. :ref="userInfo.name + '-' + userInfo.userNumber"
  136. :text="urlJump + userInfo.invitationCode"
  137. :size="500"
  138. :width="1"
  139. ></vue-qr> -->
  140. </el-col>
  141. </el-row>
  142. </el-header>
  143. <el-container style="flex: 1; overflow: auto">
  144. <el-main style="background-color: #f5f5f5; display: flex">
  145. <div
  146. class="el-main-inner"
  147. :style="{
  148. backgroundColor:
  149. isTmpPath == '/manage/generalSituation' ? '#F7F7F7' : '#ffffff',
  150. }"
  151. >
  152. <transition name="fade" mode="out-in">
  153. <router-view></router-view>
  154. </transition>
  155. </div>
  156. </el-main>
  157. </el-container>
  158. </el-container>
  159. <!---lxh-修改密码-->
  160. <div class="dig_update">
  161. <el-dialog
  162. :visible.sync="dialogVisible"
  163. :close-on-click-modal="false"
  164. width="40%"
  165. style="border-radius: 40px"
  166. >
  167. <div slot="title">
  168. <el-form
  169. :model="ruleForm"
  170. :rules="rules"
  171. :inline="true"
  172. ref="ruleForm"
  173. label-width="150px"
  174. class="demo-ruleForm"
  175. >
  176. <p class="dig_title">修改密码</p>
  177. <div slot=""></div>
  178. <div slot="footer"></div>
  179. <el-form-item label="请输入旧密码" prop="oldpass">
  180. <el-input
  181. type="password"
  182. v-model="ruleForm.oldpass"
  183. autocomplete="off"
  184. ></el-input>
  185. </el-form-item>
  186. <el-form-item label="请输入新密码" prop="pass">
  187. <el-input
  188. type="password"
  189. v-model="ruleForm.pass"
  190. autocomplete="off"
  191. ></el-input>
  192. </el-form-item>
  193. <el-form-item label="确认新密码" prop="checkPass">
  194. <el-input
  195. type="password"
  196. v-model="ruleForm.checkPass"
  197. autocomplete="off"
  198. ></el-input>
  199. </el-form-item>
  200. <div class="dig_button">
  201. <el-button type="info" round @click="resetForm('ruleForm')">重置</el-button>
  202. <el-button type="success" round @click="submitForm('ruleForm')"
  203. >提交</el-button
  204. >
  205. </div>
  206. </el-form>
  207. </div>
  208. </el-dialog>
  209. </div>
  210. </el-container>
  211. </template>
  212. <script>
  213. import md5 from "md5";
  214. import vueQr from "vue-qr";
  215. import { mapGetters, mapActions } from "vuex";
  216. import { oSessionStorage } from "@/utils/utils";
  217. import register from "@/components/Register";
  218. import screenfull from "screenfull";
  219. export default {
  220. name: "manageMain",
  221. components: {
  222. vueQr,
  223. },
  224. computed: {
  225. // ...mapGetters(['sacleListName']),
  226. // ...mapGetters(['menuActive']),
  227. },
  228. data() {
  229. var validatePassOld = (rule, value, callback) => {
  230. // if (value === "") {
  231. // callback(new Error("请输入密码"));
  232. // } else {
  233. // let juPassword = /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]{8,16}$/;
  234. // if (!juPassword.test(this.ruleForm.oldpass)) {
  235. // callback(new Error("格式为数字+英文字母+特殊字符(~!@#$%^&*)8-16位"));
  236. // } else {
  237. // callback();
  238. // }
  239. // }
  240. if (value === "") {
  241. callback(new Error("请输入旧密码"));
  242. } else {
  243. if (value.length < 6 || value.length > 18) {
  244. callback(new Error("密码长度需在6~18位之间"));
  245. } else {
  246. this.$refs.ruleForm.validateField("pass");
  247. }
  248. callback();
  249. }
  250. };
  251. var validatePass = (rule, value, callback) => {
  252. // if (value === "") {
  253. // callback(new Error("请输入密码"));
  254. // } else {
  255. // let juPassword = /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]{8,16}$/;
  256. // if (!juPassword.test(this.ruleForm.pass)) {
  257. // callback(new Error("格式为数字+英文字母+特殊字符(~!@#$%^&*)8-16位"));
  258. // } else {
  259. // callback();
  260. // }
  261. // }
  262. if (value === "") {
  263. callback(new Error("请输入新密码"));
  264. } else {
  265. if (value.length < 6 || value.length > 18) {
  266. callback(new Error("密码长度需在6~18位之间"));
  267. } else {
  268. this.$refs.ruleForm.validateField("checkPass");
  269. }
  270. callback();
  271. }
  272. };
  273. var validatePass2 = (rule, value, callback) => {
  274. if (value === "") {
  275. callback(new Error("请再次输入密码"));
  276. } else if (value !== this.ruleForm.pass) {
  277. callback(new Error("两次输入密码不一致!"));
  278. } else if (value == this.ruleForm.oldpass) {
  279. callback(new Error("旧密码和新密码相同!"));
  280. } else {
  281. callback();
  282. }
  283. };
  284. return {
  285. //是否全屏的标志
  286. isFullscreen:false,
  287. isTmpPath: "",
  288. //是否显示退出菜单
  289. isShowMenu: false,
  290. userInfo: {}, //用户信息
  291. dialogVisible: false, //弹出窗是否可见
  292. size: "small",
  293. circleUrl: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
  294. activeIndex: "10",
  295. activeIndex2: "1",
  296. isCollapse: false,
  297. userType: "",
  298. menuList: [
  299. {
  300. id: "0",
  301. name: "用户管理",
  302. icon: require("../../assets/menu/user.png"),
  303. showItem: true,
  304. path: "/manage/userManage",
  305. },
  306. {
  307. id: "1",
  308. name: "管理员管理",
  309. icon: require("../../assets/menu/yuan.png"),
  310. showItem: true,
  311. path: "/manage/principal",
  312. },
  313. {
  314. id: "2",
  315. name: "组织架构",
  316. icon: require("../../assets/menu/zu.png"),
  317. showItem: true,
  318. path: "/manage/organizational",
  319. },
  320. {
  321. id: "3",
  322. name: "测试计划",
  323. icon: require("../../assets/menu/plan.png"),
  324. showItem: true,
  325. path: "/manage/testPlan",
  326. },
  327. {
  328. id: "4",
  329. name: "报告分析",
  330. icon: require("../../assets/menu/asy.png"),
  331. showItem: true,
  332. path: "/manage/recordListAll",
  333. child: [
  334. {
  335. id: "41",
  336. name: "用户报告",
  337. parentName: "报告分析",
  338. icon: "el-icon-user-solid",
  339. path: "/manage/userReport",
  340. showItem: true,
  341. },
  342. {
  343. id: "42",
  344. name: "计划报告",
  345. parentName: "报告分析",
  346. icon: "el-icon-user-solid",
  347. path: "/manage/planReport",
  348. showItem: true,
  349. },
  350. {
  351. id: "43",
  352. name: "对比分析",
  353. parentName: "报告分析",
  354. icon: "el-icon-user-solid",
  355. path: "/manage/comparaAnalysis",
  356. showItem: true,
  357. },
  358. ],
  359. },
  360. ],
  361. //面包屑页签
  362. crumbParent: "首页",
  363. crumbChild: null,
  364. //修改密码
  365. ruleForm: {
  366. pass: "",
  367. checkPass: "",
  368. oldpass: "",
  369. },
  370. upPass: {
  371. institutionNo: "",
  372. password: "",
  373. },
  374. rules: {
  375. pass: [{ required: true, validator: validatePass, trigger: "blur" }],
  376. checkPass: [{ required: true, validator: validatePass2, trigger: "blur" }],
  377. oldpass: [{ required: true, validator: validatePassOld, trigger: "blur" }],
  378. },
  379. ifAdmin: false,
  380. ifSupAdmin: false,
  381. active: "/manage/adminHome",
  382. urlJump: "http://152.136.24.101:8997?invitationCode=", //二维码跳转链接
  383. };
  384. },
  385. created() {
  386. if (oSessionStorage.getItem("userInfo")) {
  387. this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
  388. this.userType = this.userInfo.roleType;
  389. //假如当前的用户是管理员
  390. if (this.userType == "5") {
  391. this.menuList = [
  392. {
  393. id: "10",
  394. name: "概况",
  395. icon: require("../../assets/menu/user.png"),
  396. showItem: true,
  397. path: "/manage/generalSituation",
  398. },
  399. // {
  400. // id: "0",
  401. // name: "用户管理",
  402. // icon: require("../../assets/menu/user.png"),
  403. // showItem: true,
  404. // path: "/manage/userManage",
  405. // },
  406. {
  407. id: "1",
  408. name: "管理员管理",
  409. icon: require("../../assets/menu/yuan.png"),
  410. showItem: true,
  411. path: "/manage/principal",
  412. },
  413. {
  414. id: "2",
  415. name: "组织架构",
  416. icon: require("../../assets/menu/zu.png"),
  417. showItem: true,
  418. path: "/manage/organizational",
  419. },
  420. {
  421. id: "3",
  422. name: "测试计划",
  423. icon: require("../../assets/menu/plan.png"),
  424. showItem: true,
  425. path: "/manage/testPlan",
  426. },
  427. {
  428. id: "4",
  429. name: "报告分析",
  430. icon: require("../../assets/menu/asy.png"),
  431. showItem: true,
  432. path: "/manage/recordListAll",
  433. child: [
  434. {
  435. id: "41",
  436. name: "用户报告",
  437. parentName: "报告分析",
  438. icon: "el-icon-user-solid",
  439. path: "/manage/userReport",
  440. showItem: true,
  441. },
  442. {
  443. id: "42",
  444. name: "计划报告",
  445. parentName: "报告分析",
  446. icon: "el-icon-user-solid",
  447. path: "/manage/planReport",
  448. showItem: true,
  449. },
  450. {
  451. id: "43",
  452. name: "对比分析",
  453. parentName: "报告分析",
  454. icon: "el-icon-user-solid",
  455. path: "/manage/comparaAnalysis",
  456. showItem: true,
  457. },
  458. {
  459. id: "44",
  460. name: "趋势统计",
  461. parentName: "报告分析",
  462. icon: "el-icon-user-solid",
  463. path: "/manage/tendency",
  464. showItem: true,
  465. },
  466. ],
  467. },
  468. ];
  469. // for (let i = 0; i < this.menuList.length; i++) {
  470. // if (
  471. // this.menuList[i].id == "5" ||
  472. // this.menuList[i].id == "6" ||
  473. // this.menuList[i].id == "2" ||
  474. // this.menuList[i].id == "3" ||
  475. // this.menuList[i].id == "1"
  476. // ) {
  477. // this.menuList[i].showItem = false;
  478. // }
  479. // }
  480. } else if (this.userType == "4") {
  481. //
  482. this.menuList = [
  483. {
  484. id: "10",
  485. name: "概况",
  486. icon: require("../../assets/menu/user.png"),
  487. showItem: true,
  488. path: "/manage/generalSituation",
  489. },
  490. {
  491. id: "0",
  492. name: "学生管理",
  493. icon: require("../../assets/menu/yuan.png"),
  494. showItem: true,
  495. path: "/manage/userManage",
  496. },
  497. // {
  498. // id: "5",
  499. // name: "教师管理",
  500. // icon: require("../../assets/menu/yuan.png"),
  501. // showItem: true,
  502. // path: "/manage/teacherManage",
  503. // },
  504. {
  505. id: "6",
  506. name: "辅导员管理",
  507. icon: require("../../assets/menu/yuan.png"),
  508. showItem: true,
  509. path: "/manage/instructorManage",
  510. },
  511. {
  512. id: "2",
  513. name: "组织架构",
  514. icon: require("../../assets/menu/zu.png"),
  515. showItem: true,
  516. path: "/manage/organizational",
  517. },
  518. {
  519. id: "3",
  520. name: "测试计划",
  521. icon: require("../../assets/menu/plan.png"),
  522. showItem: true,
  523. path: "/manage/testPlan",
  524. },
  525. {
  526. id: "4",
  527. name: "报告分析",
  528. icon: require("../../assets/menu/asy.png"),
  529. showItem: true,
  530. path: "/manage/recordListAll",
  531. child: [
  532. {
  533. id: "41",
  534. name: "用户报告",
  535. parentName: "报告分析",
  536. icon: "el-icon-user-solid",
  537. path: "/manage/userReport",
  538. showItem: true,
  539. },
  540. {
  541. id: "42",
  542. name: "计划报告",
  543. parentName: "报告分析",
  544. icon: "el-icon-user-solid",
  545. path: "/manage/planReport",
  546. showItem: true,
  547. },
  548. {
  549. id: "43",
  550. name: "对比分析",
  551. parentName: "报告分析",
  552. icon: "el-icon-user-solid",
  553. path: "/manage/comparaAnalysis",
  554. showItem: true,
  555. },
  556. {
  557. id: "44",
  558. name: "趋势统计",
  559. parentName: "趋势统计",
  560. icon: "el-icon-user-solid",
  561. path: "/manage/tendency",
  562. showItem: true,
  563. },
  564. ],
  565. },
  566. ];
  567. } else if (this.userType == "3") {
  568. this.menuList = [
  569. // {
  570. // id: "10",
  571. // name: "概况",
  572. // icon: require("../../assets/menu/user.png"),
  573. // showItem: true,
  574. // path: "/manage/generalSituation",
  575. // },
  576. {
  577. id: "0",
  578. name: "学生管理",
  579. icon: require("../../assets/menu/yuan.png"),
  580. showItem: true,
  581. path: "/manage/userManage",
  582. },
  583. // {
  584. // id: "5",
  585. // name: "教师管理",
  586. // icon: require("../../assets/menu/user.png"),
  587. // showItem: true,
  588. // path: "/manage/teacherManage",
  589. // },
  590. // {
  591. // id: "6",
  592. // name: "辅导员管理",
  593. // icon: require("../../assets/menu/user.png"),
  594. // showItem: true,
  595. // path: "/manage/instructorManage",
  596. // },
  597. {
  598. id: "2",
  599. name: "组织架构",
  600. icon: require("../../assets/menu/zu.png"),
  601. showItem: true,
  602. path: "/manage/organizational",
  603. },
  604. {
  605. id: "3",
  606. name: "测试计划",
  607. icon: require("../../assets/menu/plan.png"),
  608. showItem: true,
  609. path: "/manage/testPlan",
  610. },
  611. {
  612. id: "4",
  613. name: "报告分析",
  614. icon: require("../../assets/menu/asy.png"),
  615. showItem: true,
  616. path: "/manage/recordListAll",
  617. child: [
  618. {
  619. id: "41",
  620. name: "用户报告",
  621. parentName: "报告分析",
  622. icon: "el-icon-user-solid",
  623. path: "/manage/userReport",
  624. showItem: true,
  625. },
  626. {
  627. id: "42",
  628. name: "计划报告",
  629. parentName: "报告分析",
  630. icon: "el-icon-user-solid",
  631. path: "/manage/planReport",
  632. showItem: true,
  633. },
  634. {
  635. id: "43",
  636. name: "对比分析",
  637. parentName: "报告分析",
  638. icon: "el-icon-user-solid",
  639. path: "/manage/comparaAnalysis",
  640. showItem: true,
  641. },
  642. {
  643. id: "44",
  644. name: "趋势统计",
  645. parentName: "趋势统计",
  646. icon: "el-icon-user-solid",
  647. path: "/manage/tendency",
  648. showItem: true,
  649. },
  650. ],
  651. },
  652. ];
  653. }
  654. }
  655. },
  656. mounted() {
  657. //获取当前的路由信息
  658. let codeImage = sessionStorage.getItem("codeImage");
  659. this.urlJump = codeImage + "?invitationCode=";
  660. let that = this;
  661. // 页面初始化或者刷新页面初始化页签及激活菜单-2020-03-17
  662. this.active = this.$route.path;
  663. this.selectMenu(this.$route.path);
  664. this.bus.$on("menuStatusUpdate", (e) => {
  665. that.$refs.menu.activeIndex = e;
  666. that.active = e;
  667. console.log("-----------------");
  668. console.log(that.active);
  669. // that.$forceUpdate()
  670. that.selectMenu(e);
  671. });
  672. //开始设置全屏的监听方法
  673. screenfull.on("change", this.change);
  674. //得到用户信息,根据角色信息判断哪个显示哪个不显示
  675. },
  676. destroyed(){
  677. screenfull.off("change", this.change);
  678. },
  679. methods: {
  680. ...mapActions({
  681. // setSacleListName:"setSacleListName",
  682. // setMenuActive:"setMenuActive"
  683. }),
  684. fullScreenFun(){
  685. console.log(screenfull)
  686. // debugger;
  687. if(!screenfull.isEnabled){
  688. this.$message.error('该浏览不支持缩放')
  689. }
  690. if( this.isFullscreen){
  691. screenfull.exit()
  692. }else{
  693. screenfull.request()
  694. }
  695. // screenfull.toggle()
  696. // screenfull.request()
  697. },
  698. change(){
  699. this.isFullscreen =screenfull.isFullscreen
  700. },
  701. changeMenu: function () {
  702. this.isCollapse = !this.isCollapse;
  703. },
  704. mouseenterFun() {
  705. this.isShowMenu = true;
  706. },
  707. mouseLeaveFun() {
  708. this.isShowMenu = false;
  709. },
  710. //匹配获取页签名称-2020-03-17 lwl
  711. selectMenu(param) {
  712. // console.log("-----------selectMenu");
  713. // console.log(param);
  714. this.isTmpPath = param;
  715. this.menuList.forEach((item) => {
  716. if (item.path == param) {
  717. this.crumbParent = item.name;
  718. this.crumbChild = null;
  719. // return;
  720. } else {
  721. //先判断是否有child
  722. //如果没有
  723. if (item.hasOwnProperty("child")) {
  724. item.child.forEach((i) => {
  725. if (i.path == param) {
  726. this.crumbParent = i.parentName;
  727. this.crumbChild = i.name;
  728. }
  729. });
  730. }
  731. }
  732. });
  733. },
  734. //下载专属二维码
  735. downCode(linkId) {
  736. const iconUrl = this.$refs[linkId].$el.src;
  737. const a = document.createElement("a");
  738. const event = new MouseEvent("click");
  739. a.download = linkId;
  740. a.href = iconUrl;
  741. a.dispatchEvent(event);
  742. },
  743. // 退出
  744. escape() {
  745. // localStorage.clear();
  746. // sessionStorage.clear();
  747. //
  748. // this.$router.push({
  749. // path: "/",
  750. // });
  751. oSessionStorage.removeItem("userInfo");
  752. oSessionStorage.removeItem("token");
  753. this.$router.push({ path: "/" });
  754. },
  755. /*lxh-修改密码*/
  756. submitForm(formName) {
  757. this.$refs[formName].validate((valid) => {
  758. if (valid) {
  759. this.$http.get(
  760. `/system/updatePassword?userNo=${this.userInfo.userNo}&password=${md5(
  761. this.ruleForm.pass
  762. )}&oldPassword=${md5(this.ruleForm.oldpass)}`,
  763. // {
  764. // userNo: this.userInfo.userNo,
  765. // password: md5(this.ruleForm.pass),
  766. // oldPassword: md5(this.ruleForm.oldpass),
  767. // },
  768. {},
  769. (res) => {
  770. if (res.code == 2001) {
  771. this.$message({
  772. message: "旧密码错误",
  773. type: "error",
  774. });
  775. }
  776. if (res.code == 200) {
  777. this.ruleForm.oldpass = "";
  778. this.ruleForm.pass = "";
  779. this.ruleForm.checkPass = "";
  780. this.dialogVisible = false;
  781. this.$message({
  782. message: "密码修改完成!",
  783. type: "success",
  784. });
  785. sessionStorage.clear();
  786. this.$router.push({
  787. path: "/",
  788. });
  789. }
  790. }
  791. );
  792. } else {
  793. console.log("error submit!!");
  794. return false;
  795. }
  796. });
  797. },
  798. // 重置表单
  799. resetForm(formName) {
  800. this.$refs[formName].resetFields();
  801. },
  802. // 修改密码
  803. changePwd() {
  804. this.dialogVisible = true;
  805. },
  806. },
  807. };
  808. </script>
  809. >
  810. <style>
  811. .side_class {
  812. }
  813. .el-submenu .el-menu-item {
  814. height: 50px;
  815. line-height: 50px;
  816. /* padding: 0 45px; */
  817. min-width: auto !important;
  818. }
  819. .aside-menu .el-menu-item {
  820. margin-left: 20px;
  821. color: #ffffff !important;
  822. margin-right: 20px;
  823. border-radius: 40px;
  824. height: 40px;
  825. line-height: 40px;
  826. margin-top: 20px;
  827. padding-left: 0px !important;
  828. }
  829. .el-menu--popup {
  830. /* min-width:100px */
  831. }
  832. .el-submenu__title:hover {
  833. background: #00bf78 !important;
  834. margin-left: 20px;
  835. margin-right: 20px;
  836. border-radius: 40px;
  837. height: 40px;
  838. line-height: 40px;
  839. margin-top: 20px;
  840. padding-left: 0px !important;
  841. }
  842. .el-submenu__title {
  843. /* background-color: #158824; */
  844. /* margin-left:20px; */
  845. margin-right: 20px;
  846. height: 40px;
  847. line-height: 40px;
  848. margin-top: 20px;
  849. border-radius: 40px;
  850. }
  851. .el-menu {
  852. background-color: #070707;
  853. border-right: 0px;
  854. }
  855. .el-menu-item-group .el-menu-item.is-active {
  856. background-color: #00bf78 !important;
  857. }
  858. .el-menu-item-group .el-menu-item:hover {
  859. background-color: #00bf78 !important;
  860. padding-left: 0px !important;
  861. }
  862. .el-menu-item-group__title {
  863. padding: 0px !important;
  864. line-height: normal;
  865. font-size: 12px;
  866. color: #909399;
  867. }
  868. .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
  869. .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
  870. .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  871. /* background-color: transparent !important; */
  872. background-color: #00bf78 !important;
  873. padding-left: 0px !important;
  874. }
  875. .el-menu-item:focus,
  876. .el-menu-item:hover {
  877. outline: 0;
  878. background-color: #00bf78 !important;
  879. }
  880. </style>
  881. <style lang="less" scoped>
  882. .el-menu-vertical-demo:not(.el-menu--collapse) {
  883. width: 200px;
  884. // min-height: 400px;
  885. }
  886. .shadow-menu {
  887. // box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.1);
  888. }
  889. #app {
  890. margin-top: 0px;
  891. }
  892. .el-header {
  893. padding: 0 0px !important;
  894. box-sizing: border-box;
  895. flex-shrink: 0;
  896. }
  897. .menu-top-left {
  898. background-color: black;
  899. height: 3.75rem;
  900. display: flex;
  901. align-items: center;
  902. font-size: 16px;
  903. line-height: 2;
  904. }
  905. .menu-top-left i img {
  906. width: 30px;
  907. height: 30px;
  908. }
  909. .menu-top-left-title {
  910. color: #ffffff;
  911. font-size: 1rem;
  912. }
  913. .el-menu--horizontal {
  914. // position: absolute;
  915. // top: 60px;
  916. // z-index: 2003;
  917. // left: 975px !important;
  918. }
  919. /*.el-menu--horizontal > .el-submenu {*/
  920. /*float: right;*/
  921. /*}*/
  922. // el-menu--horizontal > .el-menu-item {
  923. // color:#000000
  924. // }
  925. .top-menu-control {
  926. float: left;
  927. }
  928. .aside-menu {
  929. background-color: #000000;
  930. /*height: 98vh;*/
  931. height: 100vh;
  932. text-align: left;
  933. // background: url('../../assets/img/side/side_bg.png') no-repeat;
  934. // background-size: 100% 100vh;
  935. /*padding-top: 60px;*/
  936. // border-top-right-radius: 40px;
  937. // border-bottom-right-radius: 40px;
  938. }
  939. .aside-menu .el-menu-item.is-active {
  940. background: #00bf78 !important;
  941. margin-left: 20px;
  942. margin-right: 20px;
  943. border-radius: 40px;
  944. height: 40px;
  945. line-height: 40px;
  946. margin-top: 20px;
  947. }
  948. .aside-menu .el-menu-item {
  949. // background: #00BF78 !important;
  950. margin-left: 20px;
  951. color: #ffffff !important;
  952. margin-right: 20px;
  953. border-radius: 40px;
  954. height: 40px;
  955. line-height: 40px;
  956. margin-top: 20px;
  957. }
  958. .el-menu-item-group .el-menu-item.is-active {
  959. background: #00bf78 !important;
  960. margin-left: 20px;
  961. margin-right: 20px;
  962. padding-left: 0px !important;
  963. }
  964. .fade-enter {
  965. opacity: 0;
  966. }
  967. .fade-leave {
  968. opacity: 1;
  969. }
  970. .fade-leave-active,
  971. .fade-enter-active {
  972. transition: opacity 0s;
  973. }
  974. /*.rightExit {*/
  975. /*float: right !important;*/
  976. /*}*/
  977. .main-header {
  978. height: 40px !important;
  979. padding: 20px 0 0 20px !important;
  980. .menu-hide {
  981. height: 20px !important;
  982. text-align: left;
  983. line-height: 20px !important;
  984. }
  985. }
  986. .admin-header-content {
  987. // background: #57acbb;
  988. background: transparent;
  989. height: 100% !important;
  990. display: flex;
  991. flex-direction: row;
  992. justify-content: space-between;
  993. align-items: center;
  994. }
  995. .admin-header-content .el-col {
  996. height: 100% !important;
  997. }
  998. .admin-header-content .admin-logo-content {
  999. /*box-sizing: border-box;*/
  1000. /*width: 100%;*/
  1001. /*height: 100%;*/
  1002. width: 165px;
  1003. height: 45px;
  1004. padding: 8px 0 8px 20px;
  1005. font-size: 18px;
  1006. color: #fff;
  1007. text-align: left;
  1008. line-height: 45px;
  1009. }
  1010. .admin-header-content .admin-logo-content img {
  1011. width: 100%;
  1012. height: 100%;
  1013. }
  1014. .admin-header-content .admin-head-content {
  1015. width: 100%;
  1016. height: 100%;
  1017. display: flex;
  1018. flex-direction: column;
  1019. justify-content: space-between;
  1020. align-items: center;
  1021. flex: 1;
  1022. }
  1023. .admin-header-content .el-menu-demo {
  1024. height: 100%;
  1025. }
  1026. .el-menu--horizontal > .el-submenu .el-submenu__title,
  1027. /deep/.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
  1028. border-bottom: none !important;
  1029. margin-left: 20px;
  1030. margin-right: 20px;
  1031. }
  1032. /deep/.el-menu--horizontal > .el-submenu .el-submenu__icon-arrow {
  1033. color: #161616;
  1034. }
  1035. .el-menu.el-menu--horizontal {
  1036. border-bottom: none;
  1037. }
  1038. .admin-breadcrumb {
  1039. padding-top: 3px;
  1040. margin-left: -18px;
  1041. font-weight: 700;
  1042. }
  1043. .just-right {
  1044. display: flex;
  1045. flex-direction: row;
  1046. justify-content: flex-end;
  1047. .user_out {
  1048. min-width: 150px;
  1049. position: relative;
  1050. display: flex;
  1051. align-items: center;
  1052. .user_out_img {
  1053. width: 40px;
  1054. }
  1055. .user_out_des {
  1056. margin-right: 40px;
  1057. font-size: 16px;
  1058. font-weight: 700;
  1059. }
  1060. .user_out_ab {
  1061. border-bottom-left-radius: 20px;
  1062. border-bottom-right-radius: 20px;
  1063. position: absolute;
  1064. background-color: #ffffff;
  1065. margin-top: 150px;
  1066. z-index: 100;
  1067. .exit {
  1068. padding-top: 20px;
  1069. padding-left: 40px;
  1070. padding-right: 40px;
  1071. }
  1072. .update_pass {
  1073. padding: 20px 40px;
  1074. }
  1075. .exit:hover {
  1076. color: #00bf78;
  1077. padding-top: 20px;
  1078. padding-left: 40px;
  1079. padding-right: 40px;
  1080. }
  1081. .update_pass:hover {
  1082. color: #00bf78;
  1083. padding: 20px 40px;
  1084. }
  1085. }
  1086. }
  1087. }
  1088. .el-main-inner {
  1089. display: flex;
  1090. width: 100%;
  1091. padding: 20px;
  1092. border-radius: 40px;
  1093. }
  1094. .el-main {
  1095. box-sizing: border-box !important;
  1096. display: flex !important;
  1097. overflow: hidden !important;
  1098. border-bottom-left-radius: 40px;
  1099. }
  1100. .menu_name {
  1101. color: #ffffff;
  1102. }
  1103. .menu_sub_tt {
  1104. margin-left: 10px;
  1105. color: white;
  1106. display: flex;
  1107. flex-direction: row;
  1108. align-items: center;
  1109. .menu_sub_t1 {
  1110. // background-color: #ffffff;
  1111. // border-radius: 50%;
  1112. width: 5px;
  1113. height: 5px;
  1114. margin-right: 20px;
  1115. }
  1116. }
  1117. .el-container-com {
  1118. height: 100vh;
  1119. display: flex;
  1120. flex-direction: column;
  1121. // border-top-left-radius: 40px;
  1122. // border-bottom-left-radius: 40px;
  1123. background-color: #000000;
  1124. // background: url('../../assets/img/side/side_bg.png') no-repeat;
  1125. // background-size: 100% 100vh;
  1126. }
  1127. .main_top_1 {
  1128. border-top-left-radius: 40px;
  1129. display: flex;
  1130. flex-direction: row;
  1131. align-items: center;
  1132. margin-top: 20px;
  1133. margin-left: 20px;
  1134. .blue {
  1135. background-color: #00bf78;
  1136. width: 10px;
  1137. margin-right: 30px;
  1138. height: 20px;
  1139. border-radius: 5px;
  1140. }
  1141. }
  1142. .menu_icon_mm {
  1143. display: flex;
  1144. flex-direction: row;
  1145. align-items: center;
  1146. .menu_icon_img {
  1147. width: 15px;
  1148. margin-right: 10px;
  1149. padding-left: 10px;
  1150. }
  1151. }
  1152. .dig_update /deep/.el-dialog {
  1153. box-shadow: none !important;
  1154. background: transparent !important;
  1155. }
  1156. .demo-ruleForm /deep/ .el-form-item {
  1157. margin-right: 10px;
  1158. vertical-align: top;
  1159. display: flex !important;
  1160. flex-direction: column;
  1161. }
  1162. .demo-ruleForm /deep/.el-form-item__label {
  1163. text-align: left;
  1164. vertical-align: middle;
  1165. float: left;
  1166. font-size: 14px;
  1167. color: #606266;
  1168. line-height: 40px;
  1169. padding: 0 12px 0 0;
  1170. -webkit-box-sizing: border-box;
  1171. box-sizing: border-box;
  1172. }
  1173. .demo-ruleForm /deep/.el-input {
  1174. width: 100% !important;
  1175. }
  1176. .demo-ruleForm /deep/.el-input__inner {
  1177. width: 100% !important;
  1178. background-color: #f7f7f7;
  1179. border: 0px;
  1180. }
  1181. .dig_button {
  1182. display: flex;
  1183. width: 100%;
  1184. justify-content: space-around;
  1185. }
  1186. .demo-ruleForm {
  1187. background-color: #ffffff;
  1188. // border-radius: 20px;
  1189. margin-right: -10px;
  1190. margin-top: -10px;
  1191. padding-right: 100px;
  1192. padding-left: 100px;
  1193. border-radius: 20px;
  1194. padding-top: 20px;
  1195. padding-bottom: 40px;
  1196. .dig_title {
  1197. margin-bottom: 30px;
  1198. text-align: center;
  1199. font-weight: 700;
  1200. }
  1201. }
  1202. .aab {
  1203. color: #48d68e;
  1204. margin-left: 20px;
  1205. margin-top: 10px;
  1206. font-weight: 700;
  1207. font-size: 24px;
  1208. -webkit-transform: skew(-10deg);
  1209. letter-spacing: 2px;
  1210. /* for Chrome||Safari */
  1211. -ms-transform: skew(-10deg);
  1212. /* for IE */
  1213. -moz-transform: skew(-10deg);
  1214. /* for Firefox */
  1215. -o-transform: skew(-10deg);
  1216. /* for Opera */
  1217. }
  1218. .aac {
  1219. padding-left: 20px;
  1220. padding-right: 20px;
  1221. text-align: center;
  1222. color: #48d68e;
  1223. // margin-left: 20px;
  1224. margin-top: 40px;
  1225. font-weight: 700;
  1226. font-size: 20px;
  1227. letter-spacing: 2px;
  1228. // -webkit-transform: skew(-10deg);
  1229. // /* for Chrome||Safari */
  1230. // -ms-transform: skew(-10deg);
  1231. // /* for IE */
  1232. // -moz-transform: skew(-10deg);
  1233. // /* for Firefox */
  1234. // -o-transform: skew(-10deg);
  1235. /* for Opera */
  1236. }
  1237. </style>