Jelajahi Sumber

config right

liujq 4 tahun lalu
induk
melakukan
6ea8d10796
70 mengubah file dengan 241 tambahan dan 199 penghapusan
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/css/app.8fd1d792.css
  3. 0 0
      dist/static/css/chunk-1ffb482e.2fe82036.css
  4. 0 0
      dist/static/css/chunk-238c903c.3c7f5ad9.css
  5. 0 0
      dist/static/css/chunk-34907de3.8a4f4c4d.css
  6. 0 0
      dist/static/css/chunk-43338aec.28d59488.css
  7. 0 0
      dist/static/css/chunk-461b7d48.f2242f57.css
  8. 0 0
      dist/static/css/chunk-4a50fc6e.993b283a.css
  9. 0 0
      dist/static/css/chunk-4b1d9359.31bb08e7.css
  10. 0 0
      dist/static/css/chunk-50e94f12.7adad203.css
  11. 1 0
      dist/static/css/chunk-560dffcc.a3d0de86.css
  12. 1 1
      dist/static/css/chunk-6c36ef46.91cba178.css
  13. 0 0
      dist/static/css/chunk-70388036.9e88663b.css
  14. 0 0
      dist/static/css/chunk-7464df60.37bc9771.css
  15. 0 0
      dist/static/css/chunk-785a37df.c67ea6f1.css
  16. 0 0
      dist/static/css/chunk-f0aa10e6.a5bfe2c0.css
  17. 0 0
      dist/static/js/app.75205dbb.js
  18. 0 0
      dist/static/js/app.8e90e3f4.js
  19. 0 0
      dist/static/js/chunk-060a14dc.0b501a4b.js
  20. 0 0
      dist/static/js/chunk-07fc91a6.9dc30656.js
  21. 0 0
      dist/static/js/chunk-13cdbe69.2888c273.js
  22. 0 0
      dist/static/js/chunk-1ffb482e.9625a5fd.js
  23. 0 0
      dist/static/js/chunk-231fea20.b344dde7.js
  24. 0 1
      dist/static/js/chunk-238c903c.64b8b995.js
  25. 0 0
      dist/static/js/chunk-24293cf8.70d21d3a.js
  26. 1 0
      dist/static/js/chunk-2d0ccfc9.6dc97524.js
  27. 0 0
      dist/static/js/chunk-30c47d5d.c307387d.js
  28. 0 0
      dist/static/js/chunk-34907de3.d59e8a80.js
  29. 0 0
      dist/static/js/chunk-3546515e.ca325ee6.js
  30. 0 0
      dist/static/js/chunk-36ddeec9.65d99a2a.js
  31. 0 0
      dist/static/js/chunk-43338aec.b2ac15a8.js
  32. 0 0
      dist/static/js/chunk-455adc74.d81c2225.js
  33. 0 0
      dist/static/js/chunk-461b7d48.cc0a15b5.js
  34. 0 0
      dist/static/js/chunk-4a50fc6e.23670207.js
  35. 0 0
      dist/static/js/chunk-4b1d9359.22e0071d.js
  36. 0 0
      dist/static/js/chunk-4e13d03d.3733e000.js
  37. 0 0
      dist/static/js/chunk-50e94f12.8931296d.js
  38. 0 0
      dist/static/js/chunk-5379223b.bd90e4f5.js
  39. 0 0
      dist/static/js/chunk-560dffcc.1628fd20.js
  40. 0 0
      dist/static/js/chunk-593f9664.6ad207d7.js
  41. 0 0
      dist/static/js/chunk-59f57e8c.3d808f30.js
  42. 0 0
      dist/static/js/chunk-67a054c9.7f4b4122.js
  43. 0 0
      dist/static/js/chunk-6c36ef46.7e2f547c.js
  44. 0 0
      dist/static/js/chunk-6d588c2f.68bd7792.js
  45. 0 0
      dist/static/js/chunk-70388036.394321e9.js
  46. 0 0
      dist/static/js/chunk-7464df60.d36741aa.js
  47. 0 0
      dist/static/js/chunk-766bf331.2971c351.js
  48. 0 0
      dist/static/js/chunk-785a37df.8883d3c5.js
  49. 0 0
      dist/static/js/chunk-7f8b33fa.dda5b42c.js
  50. 0 0
      dist/static/js/chunk-99416556.74e2808a.js
  51. 0 0
      dist/static/js/chunk-99416556.d84005f6.js
  52. 0 0
      dist/static/js/chunk-c641447c.36798c23.js
  53. 0 0
      dist/static/js/chunk-ce6b678c.fe948818.js
  54. 0 0
      dist/static/js/chunk-ee371872.d85b647f.js
  55. 1 0
      dist/static/js/chunk-f0aa10e6.9e524746.js
  56. 0 0
      dist/static/js/chunk-f33fe27e.28a293ed.js
  57. 5 1
      src/layout/components/Navbar.vue
  58. 2 0
      src/layout/components/Sidebar/index.vue
  59. 1 0
      src/permission.js
  60. 53 33
      src/router/index.js
  61. 1 0
      src/store/getters.js
  62. 16 17
      src/store/modules/user.js
  63. 9 1
      src/utils/auth.js
  64. 4 7
      src/views/404.vue
  65. 1 0
      src/views/base/components/popup/MenuEdit.vue
  66. 2 2
      src/views/base/components/popup/RoleEdit.vue
  67. 6 3
      src/views/base/menu.vue
  68. 10 6
      src/views/login/index.vue
  69. 12 12
      src/views/mixins/exportExcel.js
  70. 115 115
      src/views/mixins/quillEditorMixin.js

File diff ditekan karena terlalu besar
+ 0 - 0
dist/index.html


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/css/app.8fd1d792.css


+ 0 - 0
dist/static/css/chunk-ce6b678c.2fe82036.css → dist/static/css/chunk-1ffb482e.2fe82036.css


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/css/chunk-238c903c.3c7f5ad9.css


+ 0 - 0
dist/static/css/chunk-ee371872.8a4f4c4d.css → dist/static/css/chunk-34907de3.8a4f4c4d.css


+ 0 - 0
dist/static/css/chunk-24293cf8.9370a6c0.css → dist/static/css/chunk-43338aec.28d59488.css


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/css/chunk-461b7d48.f2242f57.css


+ 0 - 0
dist/static/css/chunk-13cdbe69.993b283a.css → dist/static/css/chunk-4a50fc6e.993b283a.css


+ 0 - 0
dist/static/css/chunk-59f57e8c.31bb08e7.css → dist/static/css/chunk-4b1d9359.31bb08e7.css


+ 0 - 0
dist/static/css/chunk-4e13d03d.7adad203.css → dist/static/css/chunk-50e94f12.7adad203.css


+ 1 - 0
dist/static/css/chunk-560dffcc.a3d0de86.css

@@ -0,0 +1 @@
+[data-v-119b37ab] .scoped-tree{height:300px;overflow-y:auto}[data-v-119b37ab] .scoped-tree .el-tree{background:#f7f7f7}

+ 1 - 1
dist/static/css/chunk-0dbc8ac6.a5a7f98f.css → dist/static/css/chunk-6c36ef46.91cba178.css

@@ -1 +1 @@
-@supports(-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-9f10fb1c]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-9f10fb1c]{position:relative;width:520px;max-width:100%;padding:160px 35px 0;margin:0 auto;overflow:hidden}.login-container .tips[data-v-9f10fb1c]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-9f10fb1c]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-9f10fb1c]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-9f10fb1c]{position:relative}.login-container .title-container .title[data-v-9f10fb1c]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-9f10fb1c]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
+@supports(-webkit-mask:none) and (not (cater-color:#fff)){.login-container .el-input input{color:#fff}}.login-container .el-input{display:inline-block;height:47px;width:85%}.login-container .el-input input{background:transparent;border:0;-webkit-appearance:none;border-radius:0;padding:12px 5px 12px 15px;color:#fff;height:47px;caret-color:#fff}.login-container .el-input input:-webkit-autofill{-webkit-box-shadow:0 0 0 1000px #283443 inset!important;box-shadow:inset 0 0 0 1000px #283443!important;-webkit-text-fill-color:#fff!important}.login-container .el-form-item{border:1px solid hsla(0,0%,100%,.1);background:rgba(0,0,0,.1);border-radius:5px;color:#454545}.login-container[data-v-eea6f982]{min-height:100%;width:100%;background-color:#2d3a4b;overflow:hidden}.login-container .login-form[data-v-eea6f982]{position:relative;width:520px;max-width:100%;padding:160px 35px 0;margin:0 auto;overflow:hidden}.login-container .tips[data-v-eea6f982]{font-size:14px;color:#fff;margin-bottom:10px}.login-container .tips span[data-v-eea6f982]:first-of-type{margin-right:16px}.login-container .svg-container[data-v-eea6f982]{padding:6px 5px 6px 15px;color:#889aa4;vertical-align:middle;width:30px;display:inline-block}.login-container .title-container[data-v-eea6f982]{position:relative}.login-container .title-container .title[data-v-eea6f982]{font-size:26px;color:#eee;margin:0 auto 40px auto;text-align:center;font-weight:700}.login-container .show-pwd[data-v-eea6f982]{position:absolute;right:10px;top:7px;font-size:16px;color:#889aa4;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}

File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/css/chunk-70388036.9e88663b.css


+ 0 - 0
dist/static/css/chunk-30c47d5d.37bc9771.css → dist/static/css/chunk-7464df60.37bc9771.css


+ 0 - 0
dist/static/css/chunk-3546515e.c67ea6f1.css → dist/static/css/chunk-785a37df.c67ea6f1.css


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/css/chunk-f0aa10e6.a5bfe2c0.css


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/app.75205dbb.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/app.8e90e3f4.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-060a14dc.0b501a4b.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-07fc91a6.9dc30656.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-13cdbe69.2888c273.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-1ffb482e.9625a5fd.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-231fea20.b344dde7.js


+ 0 - 1
dist/static/js/chunk-238c903c.64b8b995.js

@@ -1 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-238c903c"],{"26fc":function(t,s,e){t.exports=e.p+"static/img/404_cloud.0f4bc32b.png"},"8cdb":function(t,s,e){"use strict";e.r(s);var a=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"wscn-http404-container"},[e("div",{staticClass:"wscn-http404"},[t._m(0),e("div",{staticClass:"bullshit"},[e("div",{staticClass:"bullshit__oops"},[t._v("OOPS!")]),t._m(1),e("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),e("div",{staticClass:"bullshit__info"},[t._v("Please check that the URL you entered is correct, or click the button below to return to the homepage.")]),e("a",{staticClass:"bullshit__return-home",attrs:{href:""}},[t._v("Back to home")])])])])},c=[function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"pic-404"},[a("img",{staticClass:"pic-404__parent",attrs:{src:e("a36b"),alt:"404"}}),a("img",{staticClass:"pic-404__child left",attrs:{src:e("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child mid",attrs:{src:e("26fc"),alt:"404"}}),a("img",{staticClass:"pic-404__child right",attrs:{src:e("26fc"),alt:"404"}})])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"bullshit__info"},[t._v("All rights reserved "),e("a",{staticStyle:{color:"#20a0ff"},attrs:{href:"https://wallstreetcn.com",target:"_blank"}},[t._v("wallstreetcn")])])}],i={name:"Page404",computed:{message:function(){return"The webmaster said that you can not enter this page..."}}},l=i,n=(e("97ef"),e("2877")),r=Object(n["a"])(l,a,c,!1,null,"c095f994",null);s["default"]=r.exports},"97ef":function(t,s,e){"use strict";e("ed94")},a36b:function(t,s,e){t.exports=e.p+"static/img/404.a57b6f31.png"},ed94:function(t,s,e){}}]);

File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-24293cf8.70d21d3a.js


+ 1 - 0
dist/static/js/chunk-2d0ccfc9.6dc97524.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0ccfc9"],{"4fef":function(t,a,e){"use strict";e.r(a);var i=e("ade3"),r=e("5530");e("1276"),e("ac1f"),e("a9e3");a["default"]={data:function(){return{listLoading:!1,tableData:[],currentPage:1,pageSize:10,totalRecords:1,listConfig:{},operations:[]}},created:function(){var t=this;this.$nextTick((function(){t.noCreated||t.fetchData()}))},methods:{searchHandle:function(t){this.currentPage=1,this.searchForm=t,this.fetchData()},sizeChange:function(t){this.pageSize=t,this.currentPage=1,this.fetchData()},pageHandle:function(t){this.currentPage=t,this.fetchData()},sortChange:function(t){this.currentPage=1;var a=Object(r["a"])({},this.searchForm);"ascending"===t.order?a.sort=JSON.stringify(Object(i["a"])({},t.prop,"asc")):a.sort=JSON.stringify(Object(i["a"])({},t.prop,"desc")),this.fetchData(a)},fetchData:function(t){var a=this;if(this.apiStr){var e={page:this.currentPage,page_size:this.pageSize};t?e=Object(r["a"])(Object(r["a"])({},e),t):this.searchForm&&(e=Object(r["a"])(Object(r["a"])({},e),this.searchForm)),this.getDataBefore&&this.getDataBefore(e),this.listLoading=!0;var i=this.apiStr.split(".");this.$api[i[0]][i[1]](e).then((function(t){return 1===a.currentPage&&(a.pageSize=t.page_size||1),a.totalRecords=t.total?Number(t.total):0,a.tableData=t.list||[],a.listLoading=!1,a.getMoreData&&a.getMoreData(t,e),t})).catch((function(t){a.listLoading=!1}))}}}}}}]);

File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-30c47d5d.c307387d.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-34907de3.d59e8a80.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-3546515e.ca325ee6.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-36ddeec9.65d99a2a.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-43338aec.b2ac15a8.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-455adc74.d81c2225.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-461b7d48.cc0a15b5.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-4a50fc6e.23670207.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-4b1d9359.22e0071d.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-4e13d03d.3733e000.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-50e94f12.8931296d.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-5379223b.bd90e4f5.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-560dffcc.1628fd20.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-593f9664.6ad207d7.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-59f57e8c.3d808f30.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-67a054c9.7f4b4122.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-6c36ef46.7e2f547c.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-6d588c2f.68bd7792.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-70388036.394321e9.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-7464df60.d36741aa.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-766bf331.2971c351.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-785a37df.8883d3c5.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-7f8b33fa.dda5b42c.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-99416556.74e2808a.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-99416556.d84005f6.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-c641447c.36798c23.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-ce6b678c.fe948818.js


File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-ee371872.d85b647f.js


+ 1 - 0
dist/static/js/chunk-f0aa10e6.9e524746.js

@@ -0,0 +1 @@
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f0aa10e6"],{"14e9c":function(t,s,c){},"26fc":function(t,s,c){t.exports=c.p+"static/img/404_cloud.0f4bc32b.png"},"2bc5":function(t,s,c){"use strict";c("14e9c")},"8cdb":function(t,s,c){"use strict";c.r(s);var i=function(){var t=this,s=t.$createElement,c=t._self._c||s;return c("div",{staticClass:"wscn-http404-container"},[c("div",{staticClass:"wscn-http404"},[t._m(0),c("div",{staticClass:"bullshit"},[c("div",{staticClass:"bullshit__oops"},[t._v("哎呀!")]),c("div",{staticClass:"bullshit__headline"},[t._v(t._s(t.message))]),c("div",{staticClass:"bullshit__info"},[t._v("请检查您输入的网址是否正确,或单击下面的按钮返回首页。")]),c("a",{staticClass:"bullshit__return-home",attrs:{href:"/"}},[t._v("返回首页")])])])])},a=[function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",{staticClass:"pic-404"},[i("img",{staticClass:"pic-404__parent",attrs:{src:c("a36b"),alt:"404"}}),i("img",{staticClass:"pic-404__child left",attrs:{src:c("26fc"),alt:"404"}}),i("img",{staticClass:"pic-404__child mid",attrs:{src:c("26fc"),alt:"404"}}),i("img",{staticClass:"pic-404__child right",attrs:{src:c("26fc"),alt:"404"}})])}],l={name:"Page404",computed:{message:function(){return"老板说你不能进入这个页面。。。"}}},e=l,n=(c("2bc5"),c("2877")),r=Object(n["a"])(e,i,a,!1,null,"bf558d2a",null);s["default"]=r.exports},a36b:function(t,s,c){t.exports=c.p+"static/img/404.a57b6f31.png"}}]);

File diff ditekan karena terlalu besar
+ 0 - 0
dist/static/js/chunk-f33fe27e.28a293ed.js


+ 5 - 1
src/layout/components/Navbar.vue

@@ -56,7 +56,11 @@ export default {
   methods: {
     cashUpdate () {
       this.$store.dispatch('user/getDict').then(() => {
-        this.$router.go(0)
+        this.$store.dispatch('user/getMenu').then(() => {
+          window.setTimeout(() => {
+            this.$router.go(0)
+          }, 100)
+        })
       })
     },
     toggleSideBar() {

+ 2 - 0
src/layout/components/Sidebar/index.vue

@@ -32,6 +32,8 @@ export default {
       'sidebar'
     ]),
     curRoute () {
+      // const curMenu = this.$store.getters.menuData
+      // console.log(curMenu)
       return constantRoutes
     },
     activeMenu() {

+ 1 - 0
src/permission.js

@@ -61,6 +61,7 @@ router.beforeEach(async(to, from, next) => {
       // in the free login whitelist, go directly
       next()
     } else {
+      console.log(to)
       // other pages that do not have permission to access are redirected to the login page.
       next(`/login?redirect=${to.path}`)
       NProgress.done()

+ 53 - 33
src/router/index.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import Router from 'vue-router'
 // import menuNoShowData from './menu.js'
-
+import { getStorageMenu } from '@/utils/auth'
 Vue.use(Router)
 
 /* Layout */
@@ -232,6 +232,56 @@ if (fpUser.username === 'admin') {
     ]
   })
 }
+
+function formateMenu (arr) {
+  let cArr = []
+  arr.forEach(item => {
+    if (item.perm_type === '1' || item.perm_type === '2') {
+      let cObj = {
+        path: item.path,
+        name: item.path,
+        component: resolve => require([`@/views${item.path}`], resolve),
+        meta: { title: item.name, affix: true },
+      }
+      if (item.menu_hidden === '2') cObj.hidden = true
+      if (item.children && item.children.length > 0) {
+        cObj.children = formateMenu(item.children)
+      } else {
+        delete cObj.children
+      }
+      cArr.push(cObj)
+    }
+  })
+  return cArr
+}
+
+let asyncRoutes = []
+const getMenu = () => {
+  const menuDataArr = getStorageMenu()
+  menuDataArr.forEach(item => {
+    let cObj = {
+      path: item.path,
+      component: Layout,
+      meta: { title: item.name, icon: 'dashboard' },
+    }
+    if (item.children && item.children.length > 0) {
+      cObj.children = formateMenu(item.children)
+    } else {
+      cObj.path = `/${item.path.split('/')[1]}`
+      cObj.children = [
+        {
+          path: item.path,
+          name: item.path,
+          component: resolve => require([`@/views${item.path}`], resolve),
+          meta: { title: item.name, affix: true },
+        }
+      ]
+      cObj.redirect = cObj.children[0].path
+    }
+    asyncRoutes.push(cObj)
+  })
+}
+getMenu()
 export const constantRoutes = [
   {
     path: '/login',
@@ -254,37 +304,8 @@ export const constantRoutes = [
       meta: { title: '首页', icon: 'dashboard' }
     }]
   },
-  ...moreRoutes
-]
-
-
-/**
- * asyncRoutes
- * the routes that need to be dynamically loaded based on user roles
- */
-export const asyncRoutes = [
-  // {
-  //   path: '/example',
-  //   component: Layout,
-  //   redirect: '/example/table',
-  //   name: 'Example',
-  //   meta: { title: '测试', icon: 'dashboard' },
-  //   children: [
-  //     {
-  //       path: 'table',
-  //       name: 'Table',
-  //       component: () => import('@/views/table/index'),
-  //       meta: { title: 'Table' }
-  //     },
-  //     {
-  //       path: 'tree',
-  //       name: 'Tree',
-  //       component: () => import('@/views/tree/index'),
-  //       meta: { title: 'Tree' }
-  //     }
-  //   ]
-  // },
-  // 404 page must be placed at the end !!!
+  // ...moreRoutes,
+  ...asyncRoutes,
   { path: '*', redirect: '/404', hidden: true }
 ]
 
@@ -294,7 +315,6 @@ const createRouter = () => new Router({
   routes: constantRoutes
 })
 const router = createRouter()
-
 // Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
 export function resetRouter() {
   const newRouter = createRouter()

+ 1 - 0
src/store/getters.js

@@ -6,5 +6,6 @@ const getters = {
   token: state => state.user.token,
   sysDomain: state => state.user.sysDomain,
   sysUser: state => state.user.sysUser,
+  menuData: state => state.user.menuData,
 }
 export default getters

+ 16 - 17
src/store/modules/user.js

@@ -1,5 +1,14 @@
 import Vue from 'vue'
-import { getToken, setToken, getStorageDict, setStorageDict, getStorageUser, setStorageUser } from '@/utils/auth'
+import { 
+  getToken,
+  setToken,
+  getStorageDict,
+  setStorageDict,
+  getStorageUser,
+  setStorageUser,
+  getStorageMenu,
+  setStorageMenu,
+} from '@/utils/auth'
 
 const getDefaultState = () => {
   return {
@@ -7,6 +16,7 @@ const getDefaultState = () => {
     sysDomain: getStorageUser().domain,
     sysUser: getStorageUser(),
     dictData: getStorageDict(),
+    menuData: getStorageMenu(),
   }
 }
 
@@ -27,6 +37,9 @@ const mutations = {
   },
   DICT_DATA: (state, data) => {
     state.dictData = data
+  },
+  MENU_DATA: (state, menuData) => {
+    state.menuData = menuData
   }
 }
 
@@ -56,22 +69,8 @@ const actions = {
   getMenu({ commit }) {
     return new Promise((resolve, reject) => {
       Vue.$api.base.admmenulist().then(res => {
-        console.log(res)
-        // const cObj = res || {}
-        // let newDict = {}
-        // for (let k in cObj) {
-        //   const cArr = cObj[k].map(item => {
-        //     return {
-        //       ...item,
-        //       key: item.dict_label,
-        //       val: item.dict_value
-        //     }
-        //   })
-        //   newDict[k] = cArr
-        // }
-        // setStorageDict(newDict)
-        // Vue.$dictData = Vue.prototype.$dictData = newDict
-        // commit('DICT_DATA', newDict)
+        setStorageMenu(res)
+        commit('MENU_DATA', res)
         resolve()
       }).catch(error => {
         reject(error)

+ 9 - 1
src/utils/auth.js

@@ -17,9 +17,17 @@ export function setStorageDict(data) {
   return window.sessionStorage.setItem('fp_dictData', JSON.stringify(data))
 }
 
-export function getStorageUser(data) {
+export function getStorageUser() {
   return window.sessionStorage.getItem('fp_user') ? JSON.parse(window.sessionStorage.getItem('fp_user')) : {}
 }
 export function setStorageUser(data) {
   return window.sessionStorage.setItem('fp_user', JSON.stringify(data))
 }
+
+
+export function getStorageMenu() {
+  return window.sessionStorage.getItem('fp_menu') ? JSON.parse(window.sessionStorage.getItem('fp_menu')) : []
+}
+export function setStorageMenu(data) {
+  return window.sessionStorage.setItem('fp_menu', JSON.stringify(data))
+}

+ 4 - 7
src/views/404.vue

@@ -8,13 +8,10 @@
         <img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404">
       </div>
       <div class="bullshit">
-        <div class="bullshit__oops">OOPS!</div>
-        <div class="bullshit__info">All rights reserved
-          <a style="color:#20a0ff" href="https://wallstreetcn.com" target="_blank">wallstreetcn</a>
-        </div>
+        <div class="bullshit__oops">哎呀!</div>
         <div class="bullshit__headline">{{ message }}</div>
-        <div class="bullshit__info">Please check that the URL you entered is correct, or click the button below to return to the homepage.</div>
-        <a href="" class="bullshit__return-home">Back to home</a>
+        <div class="bullshit__info">请检查您输入的网址是否正确,或单击下面的按钮返回首页。</div>
+        <a href="/" class="bullshit__return-home">返回首页</a>
       </div>
     </div>
   </div>
@@ -26,7 +23,7 @@ export default {
   name: 'Page404',
   computed: {
     message() {
-      return 'The webmaster said that you can not enter this page...'
+      return '老板说你不能进入这个页面。。。'
     }
   }
 }

+ 1 - 0
src/views/base/components/popup/MenuEdit.vue

@@ -49,6 +49,7 @@ export default {
             parentName: this.curObj.name,
             perm_status: '1', 
             perm_type: '2',
+            menu_hidden: '1',
             parentIdArr: this.curObj.ids
           }
         }

+ 2 - 2
src/views/base/components/popup/RoleEdit.vue

@@ -11,10 +11,10 @@
   center>
   <base-form style="width:400px" :data="formData" ref="ruleForm" :isInline="false" labelWidth="80px">
     <div slot="otherItem" class="scoped-tree">
+      <!-- check-strictly -->
       <el-tree
         :data="curData"
         show-checkbox
-        check-strictly
         node-key="id"
         :default-expanded-keys="checkedIds"
         :default-checked-keys="checkedIds"
@@ -84,7 +84,7 @@ export default {
               params.id = this.curObj.id
               str = 'admrolesedit'
             }
-            const resIds = this.$refs.menuTree.getCheckedNodes(false, true).map(item=> {
+            const resIds = this.$refs.menuTree.getCheckedNodes(false, false).map(item=> {
               return item.id
             })
             params.node = resIds.join(',')

+ 6 - 3
src/views/base/menu.vue

@@ -5,10 +5,9 @@
     <el-tree
       :data="curData"
       node-key="id"
-      default-expand-all
       :expand-on-click-node="false">
       <span class="custom-tree-node" slot-scope="{ node, data }">
-        <span>{{ node.data.name }} --  {{pTypeObj[node.data.perm_type]}} ----{{node.data.path}} ----{{node.data.sort}}</span>
+        <span>{{ node.data.name }} --  {{pTypeObj[node.data.perm_type]}} ----{{node.data.path}} ---- --  {{mhObj[node.data.menu_hidden]}}/{{psObj[node.data.perm_status]}} ----{{node.data.sort}}</span>
         <span>
           <el-button
             type="text"
@@ -59,6 +58,8 @@ export default {
   created () {},
   data () {
     const pTypeObj = arrToObj(this.$dictData.perm_type)
+    const mhObj = arrToObj(this.$dictData.show_hidden)
+    const psObj = arrToObj(this.$dictData.perm_status)
     return {
       defaultProps: {
         children: 'children',
@@ -68,7 +69,9 @@ export default {
       isPopupShow: false,
       curObj: {},
       curType: '',
-      pTypeObj
+      pTypeObj,
+      mhObj,
+      psObj,
     }
   },
   mounted () {

+ 10 - 6
src/views/login/index.vue

@@ -110,12 +110,16 @@ export default {
         if (valid) {
           this.loading = true
           this.$store.dispatch('user/login', this.loginForm).then(() => {
-            this.$router.push({ path: this.redirect || '/' })
-            if (this.redirect && this.redirect !== '/dashboard') {
-              window.setTimeout(() => {
-                this.$router.go(0)
-              }, 100)
-            }
+            this.$router.push({ path: '/'})
+            window.setTimeout(() => {
+              this.$router.go(0)
+            }, 100)
+            // this.$router.push({ path: this.redirect || '/' })
+            // if (this.redirect && this.redirect !== '/dashboard') {
+            //   window.setTimeout(() => {
+            //     this.$router.go(0)
+            //   }, 100)
+            // }
             this.loading = false
           }).catch(() => {
             this.loading = false

+ 12 - 12
src/views/mixins/exportExcel.js

@@ -37,18 +37,18 @@ export default {
         this.exportExcelMore(filterVal, tHeader)
         loading.close()
       } else {
-        import('@/vendor/Export2Excel').then(excel => {
-          const data = this.formatJson(filterVal, tableData)
-          const filename = `${this.$route.meta.title}${this.getTime()}`
-          excel.export_json_to_excel({
-            header: tHeader,
-            data,
-            filename,
-            autoWidth: true,
-            bookType: 'xlsx'
-          })
-          loading.close()
-        })
+        // import('@/vendor/Export2Excel').then(excel => {
+        //   const data = this.formatJson(filterVal, tableData)
+        //   const filename = `${this.$route.meta.title}${this.getTime()}`
+        //   excel.export_json_to_excel({
+        //     header: tHeader,
+        //     data,
+        //     filename,
+        //     autoWidth: true,
+        //     bookType: 'xlsx'
+        //   })
+        //   loading.close()
+        // })
       }
     },
     formatJson(filterVal, jsonData) {

+ 115 - 115
src/views/mixins/quillEditorMixin.js

@@ -1,115 +1,115 @@
-import 'quill/dist/quill.core.css'
-import 'quill/dist/quill.snow.css'
-import 'quill/dist/quill.bubble.css'
-import { quillEditor } from 'vue-quill-editor'
-export default {
-  data() {
-    let requireUrl = process.env.VUE_APP_BASE_API
-    /*富文本编辑图片上传配置*/
-    const uploadConfig = {
-      action:  `${requireUrl}/fileupload/uploadfile`,
-      methods: 'post',
-      name: 'file', 
-      // action:  '',  // 必填参数 图片上传地址
-      // methods: 'POST',  // 必填参数 图片上传方式
-      // token: '',  // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
-      // name: 'img',  // 必填参数 文件的参数名
-      // size: 500,  // 可选参数   图片大小,单位为Kb, 1M = 1024Kb
-      // accept: 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon'  // 可选 可上传的图片格式
-    }
-    // toolbar工具栏的工具选项(默认展示全部)
-    const toolOptions = [
-      ['bold', 'italic', 'underline', 'strike'],
-      ['blockquote', 'code-block'],
-      // [{ 'header': 1 }, { 'header': 2 }],
-      // [{ 'list': 'ordered' }, { 'list': 'bullet' }],
-      // [{ 'script': 'sub' }, { 'script': 'super' }],
-      // [{ 'indent': '-1' }, { 'indent': '+1' }],
-      // [{ 'direction': 'rtl' }],
-      [{ 'size': ['small', false, 'large', 'huge'] }],
-      [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
-      [{ 'color': [] }, { 'background': [] }],
-      // [{ 'font': [] }],
-      [{ 'align': [] }],
-      ['clean'],
-      ['link', 'image', 'video']
-    ]
-    const handlers = {
-      image: function image() {
-        var self = this
-        var fileInput = this.container.querySelector('input.ql-image[type=file]')
-        if (fileInput === null) {
-          fileInput = document.createElement('input')
-          fileInput.setAttribute('type', 'file')
-          // 设置图片参数名
-          if (uploadConfig.name) {
-            fileInput.setAttribute('name', uploadConfig.name)
-          }
-          // 可设置上传图片的格式
-          fileInput.setAttribute('accept', uploadConfig.accept)
-          fileInput.classList.add('ql-image')
-          // 监听选择文件
-          fileInput.addEventListener('change', function () {
-            // 创建formData
-            var formData = new FormData()
-            formData.append(uploadConfig.name, fileInput.files[0])
-            formData.append('object','product')
-            // 如果需要token且存在token
-            if (uploadConfig.token) {
-                formData.append('token', uploadConfig.token)
-            }
-            // 图片上传
-            var xhr = new XMLHttpRequest()
-            xhr.open(uploadConfig.methods, uploadConfig.action, true)
-            // 上传数据成功,会触发
-            xhr.onload = function (e) {
-              if (xhr.status === 200) {
-                var res = JSON.parse(xhr.responseText)
-                console.log(res)
-                let length = self.quill.getSelection(true).index
-                //这里很重要,你图片上传成功后,img的src需要在这里添加,res.path就是你服务器返回的图片链接。            
-                self.quill.insertEmbed(length, 'image', res.data)
-                self.quill.setSelection(length + 1)
-              }
-              fileInput.value = ''
-            }
-            // 开始上传数据
-            xhr.upload.onloadstart = function (e) {
-                fileInput.value = ''
-            }
-            // 当发生网络异常的时候会触发,如果上传数据的过程还未结束
-            xhr.upload.onerror = function (e) {
-            }
-            // 上传数据完成(成功或者失败)时会触发
-            xhr.upload.onloadend = function (e) {
-                // console.log('上传结束')
-            }
-            xhr.send(formData)
-          })
-          this.container.appendChild(fileInput)
-        }
-        fileInput.click()
-      }
-    }
-    return {
-      editorOption: {
-        theme: 'snow',
-        boundary: document.body, 
-        modules: {
-          toolbar: {
-            container: toolOptions,
-            handlers
-          }
-        },
-        placeholder: '请输入',
-        readOnly: false
-      },
-    }
-  },
-  components: {
-    quillEditor
-  },
-  created () {},
-  computed: {},
-  methods: {}
-}
+// import 'quill/dist/quill.core.css'
+// import 'quill/dist/quill.snow.css'
+// import 'quill/dist/quill.bubble.css'
+// import { quillEditor } from 'vue-quill-editor'
+// export default {
+//   data() {
+//     let requireUrl = process.env.VUE_APP_BASE_API
+//     /*富文本编辑图片上传配置*/
+//     const uploadConfig = {
+//       action:  `${requireUrl}/fileupload/uploadfile`,
+//       methods: 'post',
+//       name: 'file', 
+//       // action:  '',  // 必填参数 图片上传地址
+//       // methods: 'POST',  // 必填参数 图片上传方式
+//       // token: '',  // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
+//       // name: 'img',  // 必填参数 文件的参数名
+//       // size: 500,  // 可选参数   图片大小,单位为Kb, 1M = 1024Kb
+//       // accept: 'image/png, image/gif, image/jpeg, image/bmp, image/x-icon'  // 可选 可上传的图片格式
+//     }
+//     // toolbar工具栏的工具选项(默认展示全部)
+//     const toolOptions = [
+//       ['bold', 'italic', 'underline', 'strike'],
+//       ['blockquote', 'code-block'],
+//       // [{ 'header': 1 }, { 'header': 2 }],
+//       // [{ 'list': 'ordered' }, { 'list': 'bullet' }],
+//       // [{ 'script': 'sub' }, { 'script': 'super' }],
+//       // [{ 'indent': '-1' }, { 'indent': '+1' }],
+//       // [{ 'direction': 'rtl' }],
+//       [{ 'size': ['small', false, 'large', 'huge'] }],
+//       [{ 'header': [1, 2, 3, 4, 5, 6, false] }],
+//       [{ 'color': [] }, { 'background': [] }],
+//       // [{ 'font': [] }],
+//       [{ 'align': [] }],
+//       ['clean'],
+//       ['link', 'image', 'video']
+//     ]
+//     const handlers = {
+//       image: function image() {
+//         var self = this
+//         var fileInput = this.container.querySelector('input.ql-image[type=file]')
+//         if (fileInput === null) {
+//           fileInput = document.createElement('input')
+//           fileInput.setAttribute('type', 'file')
+//           // 设置图片参数名
+//           if (uploadConfig.name) {
+//             fileInput.setAttribute('name', uploadConfig.name)
+//           }
+//           // 可设置上传图片的格式
+//           fileInput.setAttribute('accept', uploadConfig.accept)
+//           fileInput.classList.add('ql-image')
+//           // 监听选择文件
+//           fileInput.addEventListener('change', function () {
+//             // 创建formData
+//             var formData = new FormData()
+//             formData.append(uploadConfig.name, fileInput.files[0])
+//             formData.append('object','product')
+//             // 如果需要token且存在token
+//             if (uploadConfig.token) {
+//                 formData.append('token', uploadConfig.token)
+//             }
+//             // 图片上传
+//             var xhr = new XMLHttpRequest()
+//             xhr.open(uploadConfig.methods, uploadConfig.action, true)
+//             // 上传数据成功,会触发
+//             xhr.onload = function (e) {
+//               if (xhr.status === 200) {
+//                 var res = JSON.parse(xhr.responseText)
+//                 console.log(res)
+//                 let length = self.quill.getSelection(true).index
+//                 //这里很重要,你图片上传成功后,img的src需要在这里添加,res.path就是你服务器返回的图片链接。            
+//                 self.quill.insertEmbed(length, 'image', res.data)
+//                 self.quill.setSelection(length + 1)
+//               }
+//               fileInput.value = ''
+//             }
+//             // 开始上传数据
+//             xhr.upload.onloadstart = function (e) {
+//                 fileInput.value = ''
+//             }
+//             // 当发生网络异常的时候会触发,如果上传数据的过程还未结束
+//             xhr.upload.onerror = function (e) {
+//             }
+//             // 上传数据完成(成功或者失败)时会触发
+//             xhr.upload.onloadend = function (e) {
+//                 // console.log('上传结束')
+//             }
+//             xhr.send(formData)
+//           })
+//           this.container.appendChild(fileInput)
+//         }
+//         fileInput.click()
+//       }
+//     }
+//     return {
+//       editorOption: {
+//         theme: 'snow',
+//         boundary: document.body, 
+//         modules: {
+//           toolbar: {
+//             container: toolOptions,
+//             handlers
+//           }
+//         },
+//         placeholder: '请输入',
+//         readOnly: false
+//       },
+//     }
+//   },
+//   components: {
+//     quillEditor
+//   },
+//   created () {},
+//   computed: {},
+//   methods: {}
+// }

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini