manageMain.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  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">
  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. //是否显示退出菜单
  262. isShowMenu: false,
  263. userInfo: {}, //用户信息
  264. dialogVisible: false, //弹出窗是否可见
  265. size: "small",
  266. circleUrl: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
  267. activeIndex: "10",
  268. activeIndex2: "1",
  269. isCollapse: false,
  270. userType: "",
  271. menuList: [
  272. {
  273. id: "0",
  274. name: "用户管理",
  275. icon: require("../../assets/menu/user.png"),
  276. showItem: true,
  277. path: "/manage/userManage",
  278. },
  279. {
  280. id: "1",
  281. name: "管理员管理",
  282. icon: require("../../assets/menu/yuan.png"),
  283. showItem: true,
  284. path: "/manage/principal",
  285. },
  286. {
  287. id: "2",
  288. name: "组织架构",
  289. icon: require("../../assets/menu/zu.png"),
  290. showItem: true,
  291. path: "/manage/organizational",
  292. },
  293. {
  294. id: "3",
  295. name: "测试计划",
  296. icon: require("../../assets/menu/plan.png"),
  297. showItem: true,
  298. path: "/manage/testPlan",
  299. },
  300. {
  301. id: "4",
  302. name: "报告分析",
  303. icon: require("../../assets/menu/plan.png"),
  304. showItem: true,
  305. path: "/manage/recordListAll",
  306. child: [
  307. {
  308. id: "41",
  309. name: "用户报告",
  310. parentName: "报告分析",
  311. icon: "el-icon-user-solid",
  312. path: "/manage/userReport",
  313. showItem: true,
  314. },
  315. {
  316. id: "42",
  317. name: "计划报告",
  318. parentName: "报告分析",
  319. icon: "el-icon-user-solid",
  320. path: "/manage/planReport",
  321. showItem: true,
  322. },
  323. {
  324. id: "43",
  325. name: "对比分析",
  326. parentName: "报告分析",
  327. icon: "el-icon-user-solid",
  328. path: "/manage/comparaAnalysis",
  329. showItem: true,
  330. },
  331. ],
  332. },
  333. ],
  334. //面包屑页签
  335. crumbParent: "首页",
  336. crumbChild: null,
  337. //修改密码
  338. ruleForm: {
  339. pass: "",
  340. checkPass: "",
  341. oldpass: "",
  342. },
  343. upPass: {
  344. institutionNo: "",
  345. password: "",
  346. },
  347. rules: {
  348. pass: [{ required: true, validator: validatePass, trigger: "blur" }],
  349. checkPass: [{ required: true, validator: validatePass2, trigger: "blur" }],
  350. oldpass: [{ required: true, validator: validatePassOld, trigger: "blur" }],
  351. },
  352. ifAdmin: false,
  353. ifSupAdmin: false,
  354. active: "/manage/adminHome",
  355. urlJump: "http://152.136.24.101:8997?invitationCode=", //二维码跳转链接
  356. };
  357. },
  358. created() {
  359. if (oSessionStorage.getItem("userInfo")) {
  360. this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
  361. this.userType = this.userInfo.roleType;
  362. console.log(this.userInfo);
  363. console.log(this.userType);
  364. //假如当前的用户是管理员
  365. if (this.userType == "5") {
  366. this.menuList = [
  367. {
  368. id: "10",
  369. name: "概况",
  370. icon: require("../../assets/menu/user.png"),
  371. showItem: true,
  372. path: "/manage/generalSituation",
  373. },
  374. // {
  375. // id: "0",
  376. // name: "用户管理",
  377. // icon: require("../../assets/menu/user.png"),
  378. // showItem: true,
  379. // path: "/manage/userManage",
  380. // },
  381. {
  382. id: "1",
  383. name: "管理员管理",
  384. icon: require("../../assets/menu/yuan.png"),
  385. showItem: true,
  386. path: "/manage/principal",
  387. },
  388. {
  389. id: "2",
  390. name: "组织架构",
  391. icon: require("../../assets/menu/zu.png"),
  392. showItem: true,
  393. path: "/manage/organizational",
  394. },
  395. {
  396. id: "3",
  397. name: "测试计划",
  398. icon: require("../../assets/menu/plan.png"),
  399. showItem: true,
  400. path: "/manage/testPlan",
  401. },
  402. {
  403. id: "4",
  404. name: "报告分析",
  405. icon: require("../../assets/menu/plan.png"),
  406. showItem: true,
  407. path: "/manage/recordListAll",
  408. child: [
  409. {
  410. id: "41",
  411. name: "用户报告",
  412. parentName: "报告分析",
  413. icon: "el-icon-user-solid",
  414. path: "/manage/userReport",
  415. showItem: true,
  416. },
  417. {
  418. id: "42",
  419. name: "计划报告",
  420. parentName: "报告分析",
  421. icon: "el-icon-user-solid",
  422. path: "/manage/planReport",
  423. showItem: true,
  424. },
  425. {
  426. id: "43",
  427. name: "对比分析",
  428. parentName: "报告分析",
  429. icon: "el-icon-user-solid",
  430. path: "/manage/comparaAnalysis",
  431. showItem: true,
  432. },
  433. ],
  434. },
  435. ];
  436. // for (let i = 0; i < this.menuList.length; i++) {
  437. // if (
  438. // this.menuList[i].id == "5" ||
  439. // this.menuList[i].id == "6" ||
  440. // this.menuList[i].id == "2" ||
  441. // this.menuList[i].id == "3" ||
  442. // this.menuList[i].id == "1"
  443. // ) {
  444. // this.menuList[i].showItem = false;
  445. // }
  446. // }
  447. } else if (this.userType == "4") {
  448. //
  449. this.menuList = [
  450. {
  451. id: "10",
  452. name: "概况",
  453. icon: require("../../assets/menu/user.png"),
  454. showItem: true,
  455. path: "/manage/generalSituation",
  456. },
  457. {
  458. id: "0",
  459. name: "学生管理",
  460. icon: require("../../assets/menu/user.png"),
  461. showItem: true,
  462. path: "/manage/userManage",
  463. },
  464. // {
  465. // id: "5",
  466. // name: "教师管理",
  467. // icon: require("../../assets/menu/user.png"),
  468. // showItem: true,
  469. // path: "/manage/teacherManage",
  470. // },
  471. {
  472. id: "6",
  473. name: "辅导员管理",
  474. icon: require("../../assets/menu/user.png"),
  475. showItem: true,
  476. path: "/manage/instructorManage",
  477. },
  478. {
  479. id: "2",
  480. name: "组织架构",
  481. icon: require("../../assets/menu/zu.png"),
  482. showItem: true,
  483. path: "/manage/organizational",
  484. },
  485. {
  486. id: "3",
  487. name: "测试计划",
  488. icon: require("../../assets/menu/plan.png"),
  489. showItem: true,
  490. path: "/manage/testPlan",
  491. },
  492. {
  493. id: "4",
  494. name: "报告分析",
  495. icon: require("../../assets/menu/plan.png"),
  496. showItem: true,
  497. path: "/manage/recordListAll",
  498. child: [
  499. {
  500. id: "41",
  501. name: "用户报告",
  502. parentName: "报告分析",
  503. icon: "el-icon-user-solid",
  504. path: "/manage/userReport",
  505. showItem: true,
  506. },
  507. {
  508. id: "42",
  509. name: "计划报告",
  510. parentName: "报告分析",
  511. icon: "el-icon-user-solid",
  512. path: "/manage/planReport",
  513. showItem: true,
  514. },
  515. {
  516. id: "43",
  517. name: "对比分析",
  518. parentName: "报告分析",
  519. icon: "el-icon-user-solid",
  520. path: "/manage/comparaAnalysis",
  521. showItem: true,
  522. },
  523. ],
  524. },
  525. ];
  526. } else if (this.userType == "3") {
  527. this.menuList = [
  528. {
  529. id: "10",
  530. name: "概况",
  531. icon: require("../../assets/menu/user.png"),
  532. showItem: true,
  533. path: "/manage/generalSituation",
  534. },
  535. {
  536. id: "0",
  537. name: "学生管理",
  538. icon: require("../../assets/menu/user.png"),
  539. showItem: true,
  540. path: "/manage/userManage",
  541. },
  542. // {
  543. // id: "5",
  544. // name: "教师管理",
  545. // icon: require("../../assets/menu/user.png"),
  546. // showItem: true,
  547. // path: "/manage/teacherManage",
  548. // },
  549. // {
  550. // id: "6",
  551. // name: "辅导员管理",
  552. // icon: require("../../assets/menu/user.png"),
  553. // showItem: true,
  554. // path: "/manage/instructorManage",
  555. // },
  556. {
  557. id: "2",
  558. name: "组织架构",
  559. icon: require("../../assets/menu/zu.png"),
  560. showItem: true,
  561. path: "/manage/organizational",
  562. },
  563. {
  564. id: "3",
  565. name: "测试计划",
  566. icon: require("../../assets/menu/plan.png"),
  567. showItem: true,
  568. path: "/manage/testPlan",
  569. },
  570. {
  571. id: "4",
  572. name: "报告分析",
  573. icon: require("../../assets/menu/plan.png"),
  574. showItem: true,
  575. path: "/manage/recordListAll",
  576. child: [
  577. {
  578. id: "41",
  579. name: "用户报告",
  580. parentName: "报告分析",
  581. icon: "el-icon-user-solid",
  582. path: "/manage/userReport",
  583. showItem: true,
  584. },
  585. {
  586. id: "42",
  587. name: "计划报告",
  588. parentName: "报告分析",
  589. icon: "el-icon-user-solid",
  590. path: "/manage/planReport",
  591. showItem: true,
  592. },
  593. {
  594. id: "43",
  595. name: "对比分析",
  596. parentName: "报告分析",
  597. icon: "el-icon-user-solid",
  598. path: "/manage/comparaAnalysis",
  599. showItem: true,
  600. },
  601. ],
  602. },
  603. ];
  604. }
  605. }
  606. },
  607. mounted() {
  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. // that.$forceUpdate()
  618. that.selectMenu(e);
  619. });
  620. //得到用户信息,根据角色信息判断哪个显示哪个不显示
  621. },
  622. methods: {
  623. ...mapActions({
  624. // setSacleListName:"setSacleListName",
  625. // setMenuActive:"setMenuActive"
  626. }),
  627. changeMenu: function () {
  628. this.isCollapse = !this.isCollapse;
  629. },
  630. mouseenterFun() {
  631. this.isShowMenu = true;
  632. },
  633. mouseLeaveFun() {
  634. this.isShowMenu = false;
  635. },
  636. //匹配获取页签名称-2020-03-17 lwl
  637. selectMenu(param) {
  638. this.menuList.forEach((item) => {
  639. console.log(item);
  640. if (item.path == param) {
  641. this.crumbParent = item.name;
  642. this.crumbChild = null;
  643. // return;
  644. } else {
  645. //先判断是否有child
  646. //如果没有
  647. if (item.hasOwnProperty("child")) {
  648. item.child.forEach((i) => {
  649. if (i.path == param) {
  650. this.crumbParent = i.parentName;
  651. this.crumbChild = i.name;
  652. }
  653. });
  654. }
  655. }
  656. });
  657. },
  658. //下载专属二维码
  659. downCode(linkId) {
  660. const iconUrl = this.$refs[linkId].$el.src;
  661. const a = document.createElement("a");
  662. const event = new MouseEvent("click");
  663. a.download = linkId;
  664. a.href = iconUrl;
  665. a.dispatchEvent(event);
  666. },
  667. // 退出
  668. escape() {
  669. // localStorage.clear();
  670. // sessionStorage.clear();
  671. //
  672. // this.$router.push({
  673. // path: "/",
  674. // });
  675. oSessionStorage.removeItem("userInfo");
  676. oSessionStorage.removeItem("token");
  677. this.$router.push({ path: "/" });
  678. },
  679. /*lxh-修改密码*/
  680. submitForm(formName) {
  681. this.$refs[formName].validate((valid) => {
  682. console.log(this.userInfo);
  683. if (valid) {
  684. this.$http.get(
  685. `/system/updatePassword?userNo=${this.userInfo.userNo}&password=${md5(
  686. this.ruleForm.pass
  687. )}&oldPassword=${md5(this.ruleForm.oldpass)}`,
  688. // {
  689. // userNo: this.userInfo.userNo,
  690. // password: md5(this.ruleForm.pass),
  691. // oldPassword: md5(this.ruleForm.oldpass),
  692. // },
  693. {},
  694. (res) => {
  695. if (res.code == 2001) {
  696. this.$message({
  697. message: "旧密码错误",
  698. type: "error",
  699. });
  700. }
  701. if (res.code == 200) {
  702. this.ruleForm.oldpass = "";
  703. this.ruleForm.pass = "";
  704. this.ruleForm.checkPass = "";
  705. this.dialogVisible = false;
  706. this.$message({
  707. message: "密码修改完成!",
  708. type: "success",
  709. });
  710. sessionStorage.clear();
  711. this.$router.push({
  712. path: "/",
  713. });
  714. }
  715. }
  716. );
  717. } else {
  718. console.log("error submit!!");
  719. return false;
  720. }
  721. });
  722. },
  723. // 重置表单
  724. resetForm(formName) {
  725. this.$refs[formName].resetFields();
  726. },
  727. // 修改密码
  728. changePwd() {
  729. this.dialogVisible = true;
  730. },
  731. },
  732. };
  733. </script>
  734. >
  735. <style>
  736. .el-submenu .el-menu-item {
  737. height: 50px;
  738. line-height: 50px;
  739. /* padding: 0 45px; */
  740. min-width: auto !important;
  741. }
  742. .aside-menu .el-menu-item {
  743. margin-left: 20px;
  744. color: #ffffff !important;
  745. margin-right: 20px;
  746. border-radius: 40px;
  747. height: 40px;
  748. line-height: 40px;
  749. margin-top: 20px;
  750. padding-left: 0px !important;
  751. }
  752. .el-menu--popup {
  753. /* min-width:100px */
  754. }
  755. .el-submenu__title:hover {
  756. background: #00bf78 !important;
  757. margin-left: 20px;
  758. margin-right: 20px;
  759. border-radius: 40px;
  760. height: 40px;
  761. line-height: 40px;
  762. margin-top: 20px;
  763. padding-left: 0px !important;
  764. }
  765. .el-submenu__title {
  766. /* background-color: #158824; */
  767. /* margin-left:20px; */
  768. margin-right: 20px;
  769. height: 40px;
  770. line-height: 40px;
  771. margin-top: 20px;
  772. border-radius: 40px;
  773. }
  774. .el-menu {
  775. background-color: #070707;
  776. border-right: 0px;
  777. }
  778. .el-menu-item-group .el-menu-item.is-active {
  779. background-color: #00bf78 !important;
  780. }
  781. .el-menu-item-group .el-menu-item:hover {
  782. background-color: #00bf78 !important;
  783. padding-left: 0px !important;
  784. }
  785. .el-menu-item-group__title {
  786. padding: 0px !important;
  787. line-height: normal;
  788. font-size: 12px;
  789. color: #909399;
  790. }
  791. .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
  792. .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
  793. .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
  794. /* background-color: transparent !important; */
  795. background-color: #00bf78 !important;
  796. padding-left: 0px !important;
  797. }
  798. .el-menu-item:focus,
  799. .el-menu-item:hover {
  800. outline: 0;
  801. background-color: #00bf78 !important;
  802. }
  803. </style>
  804. <style lang="less" scoped>
  805. .el-menu-vertical-demo:not(.el-menu--collapse) {
  806. width: 200px;
  807. // min-height: 400px;
  808. }
  809. .shadow-menu {
  810. // box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.1);
  811. }
  812. #app {
  813. margin-top: 0px;
  814. }
  815. .el-header {
  816. padding: 0 0px !important;
  817. box-sizing: border-box;
  818. flex-shrink: 0;
  819. }
  820. .menu-top-left {
  821. background-color: black;
  822. height: 3.75rem;
  823. display: flex;
  824. align-items: center;
  825. font-size: 16px;
  826. line-height: 2;
  827. }
  828. .menu-top-left i img {
  829. width: 30px;
  830. height: 30px;
  831. }
  832. .menu-top-left-title {
  833. color: #ffffff;
  834. font-size: 1rem;
  835. }
  836. .el-menu--horizontal {
  837. // position: absolute;
  838. // top: 60px;
  839. // z-index: 2003;
  840. // left: 975px !important;
  841. }
  842. /*.el-menu--horizontal > .el-submenu {*/
  843. /*float: right;*/
  844. /*}*/
  845. // el-menu--horizontal > .el-menu-item {
  846. // color:#000000
  847. // }
  848. .top-menu-control {
  849. float: left;
  850. }
  851. .aside-menu {
  852. background-color: #000000;
  853. /*height: 98vh;*/
  854. height: 100vh;
  855. text-align: left;
  856. /*padding-top: 60px;*/
  857. // border-top-right-radius: 40px;
  858. // border-bottom-right-radius: 40px;
  859. }
  860. .aside-menu .el-menu-item.is-active {
  861. background: #00bf78 !important;
  862. margin-left: 20px;
  863. margin-right: 20px;
  864. border-radius: 40px;
  865. height: 40px;
  866. line-height: 40px;
  867. margin-top: 20px;
  868. }
  869. .aside-menu .el-menu-item {
  870. // background: #00BF78 !important;
  871. margin-left: 20px;
  872. color: #ffffff !important;
  873. margin-right: 20px;
  874. border-radius: 40px;
  875. height: 40px;
  876. line-height: 40px;
  877. margin-top: 20px;
  878. }
  879. .el-menu-item-group .el-menu-item.is-active {
  880. background: #00bf78 !important;
  881. margin-left: 20px;
  882. margin-right: 20px;
  883. padding-left: 0px !important;
  884. }
  885. .fade-enter {
  886. opacity: 0;
  887. }
  888. .fade-leave {
  889. opacity: 1;
  890. }
  891. .fade-leave-active,
  892. .fade-enter-active {
  893. transition: opacity 0s;
  894. }
  895. /*.rightExit {*/
  896. /*float: right !important;*/
  897. /*}*/
  898. .main-header {
  899. height: 40px !important;
  900. padding: 20px 0 0 20px !important;
  901. .menu-hide {
  902. height: 20px !important;
  903. text-align: left;
  904. line-height: 20px !important;
  905. }
  906. }
  907. .admin-header-content {
  908. // background: #57acbb;
  909. background: transparent;
  910. height: 100% !important;
  911. display: flex;
  912. flex-direction: row;
  913. justify-content: space-between;
  914. align-items: center;
  915. }
  916. .admin-header-content .el-col {
  917. height: 100% !important;
  918. }
  919. .admin-header-content .admin-logo-content {
  920. /*box-sizing: border-box;*/
  921. /*width: 100%;*/
  922. /*height: 100%;*/
  923. width: 165px;
  924. height: 45px;
  925. padding: 8px 0 8px 20px;
  926. font-size: 18px;
  927. color: #fff;
  928. text-align: left;
  929. line-height: 45px;
  930. }
  931. .admin-header-content .admin-logo-content img {
  932. width: 100%;
  933. height: 100%;
  934. }
  935. .admin-header-content .admin-head-content {
  936. width: 100%;
  937. height: 100%;
  938. display: flex;
  939. flex-direction: column;
  940. justify-content: space-between;
  941. align-items: center;
  942. flex: 1;
  943. }
  944. .admin-header-content .el-menu-demo {
  945. height: 100%;
  946. }
  947. .el-menu--horizontal > .el-submenu .el-submenu__title,
  948. /deep/.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
  949. border-bottom: none !important;
  950. margin-left: 20px;
  951. margin-right: 20px;
  952. }
  953. /deep/.el-menu--horizontal > .el-submenu .el-submenu__icon-arrow {
  954. color: #161616;
  955. }
  956. .el-menu.el-menu--horizontal {
  957. border-bottom: none;
  958. }
  959. .admin-breadcrumb {
  960. padding-top: 3px;
  961. margin-left: -18px;
  962. font-weight: 700;
  963. }
  964. .just-right {
  965. display: flex;
  966. flex-direction: row;
  967. justify-content: flex-end;
  968. .user_out {
  969. min-width: 150px;
  970. position: relative;
  971. display: flex;
  972. align-items: center;
  973. .user_out_img {
  974. width: 40px;
  975. }
  976. .user_out_des {
  977. margin-right: 40px;
  978. font-size: 16px;
  979. font-weight: 700;
  980. }
  981. .user_out_ab {
  982. border-bottom-left-radius: 20px;
  983. border-bottom-right-radius: 20px;
  984. position: absolute;
  985. background-color: #ffffff;
  986. margin-top: 150px;
  987. z-index: 100;
  988. .exit {
  989. padding-top: 20px;
  990. padding-left: 40px;
  991. padding-right: 40px;
  992. }
  993. .update_pass {
  994. padding: 20px 40px;
  995. }
  996. .exit:hover {
  997. color: #00bf78;
  998. padding-top: 20px;
  999. padding-left: 40px;
  1000. padding-right: 40px;
  1001. }
  1002. .update_pass:hover {
  1003. color: #00bf78;
  1004. padding: 20px 40px;
  1005. }
  1006. }
  1007. }
  1008. }
  1009. .el-main-inner {
  1010. display: flex;
  1011. width: 100%;
  1012. background-color: #fff;
  1013. padding: 20px;
  1014. border-radius: 40px;
  1015. }
  1016. .el-main {
  1017. box-sizing: border-box !important;
  1018. display: flex !important;
  1019. overflow: hidden !important;
  1020. border-bottom-left-radius: 40px;
  1021. }
  1022. .menu_name {
  1023. color: #ffffff;
  1024. }
  1025. .menu_sub_tt {
  1026. margin-left: 10px;
  1027. color: white;
  1028. display: flex;
  1029. flex-direction: row;
  1030. align-items: center;
  1031. .menu_sub_t1 {
  1032. // background-color: #ffffff;
  1033. // border-radius: 50%;
  1034. width: 5px;
  1035. height: 5px;
  1036. margin-right: 20px;
  1037. }
  1038. }
  1039. .el-container-com {
  1040. height: 100vh;
  1041. display: flex;
  1042. flex-direction: column;
  1043. // border-top-left-radius: 40px;
  1044. // border-bottom-left-radius: 40px;
  1045. background-color: #000000;
  1046. }
  1047. .main_top_1 {
  1048. border-top-left-radius: 40px;
  1049. display: flex;
  1050. flex-direction: row;
  1051. align-items: center;
  1052. margin-top: 20px;
  1053. margin-left: 20px;
  1054. .blue {
  1055. background-color: #00bf78;
  1056. width: 10px;
  1057. margin-right: 30px;
  1058. height: 20px;
  1059. border-radius: 5px;
  1060. }
  1061. }
  1062. .menu_icon_mm {
  1063. display: flex;
  1064. flex-direction: row;
  1065. align-items: center;
  1066. .menu_icon_img {
  1067. width: 15px;
  1068. margin-right: 10px;
  1069. padding-left: 10px;
  1070. }
  1071. }
  1072. .dig_update /deep/.el-dialog {
  1073. box-shadow: none !important;
  1074. background: transparent !important;
  1075. }
  1076. .demo-ruleForm /deep/ .el-form-item {
  1077. margin-right: 10px;
  1078. vertical-align: top;
  1079. display: flex !important;
  1080. flex-direction: column;
  1081. }
  1082. .demo-ruleForm /deep/.el-form-item__label {
  1083. text-align: left;
  1084. vertical-align: middle;
  1085. float: left;
  1086. font-size: 14px;
  1087. color: #606266;
  1088. line-height: 40px;
  1089. padding: 0 12px 0 0;
  1090. -webkit-box-sizing: border-box;
  1091. box-sizing: border-box;
  1092. }
  1093. .demo-ruleForm /deep/.el-input {
  1094. width: 100% !important;
  1095. }
  1096. .demo-ruleForm /deep/.el-input__inner {
  1097. width: 100% !important;
  1098. background-color: #f7f7f7;
  1099. border: 0px;
  1100. }
  1101. .dig_button {
  1102. display: flex;
  1103. width: 100%;
  1104. justify-content: space-around;
  1105. }
  1106. .demo-ruleForm {
  1107. background-color: #ffffff;
  1108. // border-radius: 20px;
  1109. margin-right: -10px;
  1110. margin-top: -10px;
  1111. padding-right: 100px;
  1112. padding-left: 100px;
  1113. border-radius: 20px;
  1114. padding-top: 20px;
  1115. padding-bottom: 40px;
  1116. .dig_title {
  1117. margin-bottom: 30px;
  1118. text-align: center;
  1119. font-weight: 700;
  1120. }
  1121. }
  1122. .aab {
  1123. color: #48d68e;
  1124. margin-left: 20px;
  1125. margin-top: 10px;
  1126. font-weight: 700;
  1127. font-size: 24px;
  1128. -webkit-transform: skew(-10deg);
  1129. letter-spacing: 2px;
  1130. /* for Chrome||Safari */
  1131. -ms-transform: skew(-10deg);
  1132. /* for IE */
  1133. -moz-transform: skew(-10deg);
  1134. /* for Firefox */
  1135. -o-transform: skew(-10deg);
  1136. /* for Opera */
  1137. }
  1138. .aac {
  1139. padding-left: 20px;
  1140. padding-right: 20px;
  1141. text-align: center;
  1142. color: #48d68e;
  1143. // margin-left: 20px;
  1144. margin-top: 40px;
  1145. font-weight: 700;
  1146. font-size: 20px;
  1147. -webkit-transform: skew(-10deg);
  1148. letter-spacing: 2px;
  1149. /* for Chrome||Safari */
  1150. -ms-transform: skew(-10deg);
  1151. /* for IE */
  1152. -moz-transform: skew(-10deg);
  1153. /* for Firefox */
  1154. -o-transform: skew(-10deg);
  1155. /* for Opera */
  1156. }
  1157. </style>