manageMain.vue 32 KB

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