Browse Source

权限部分修改

13408401276 3 năm trước cách đây
mục cha
commit
d0a9716ce4

+ 15 - 0
.vscode/launch.json

@@ -0,0 +1,15 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "pwa-chrome",
+            "request": "launch",
+            "name": "Launch Chrome against localhost",
+            "url": "http://localhost:8080",
+            "webRoot": "${workspaceFolder}"
+        }
+    ]
+}

+ 35 - 0
package-lock.json

@@ -14025,6 +14025,41 @@
       "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=",
       "dev": true
     },
+    "ol": {
+      "version": "6.6.0",
+      "resolved": "https://registry.npmjs.org/ol/-/ol-6.6.0.tgz",
+      "integrity": "sha512-4kJM5JKNRlOJnF2ndIoD4qpFmnoYQ8n+Q2qj6u6q63O4yDIrGHombea2OGrrlDPn1kLlKdCPLce8Vams1VIqow==",
+      "requires": {
+        "ol-mapbox-style": "^6.4.1",
+        "pbf": "3.2.1",
+        "rbush": "^3.0.1"
+      },
+      "dependencies": {
+        "ol-mapbox-style": {
+          "version": "6.4.1",
+          "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.4.1.tgz",
+          "integrity": "sha512-qeHgB5lEaCjvpaR6oK8bPWqPTUAYzM2CTSfYJzujIU3egYLPCvJfVagIfTEMRDUG3CXTtIYHOI2Pg58ihhWJYA==",
+          "requires": {
+            "@mapbox/mapbox-gl-style-spec": "^13.20.1",
+            "mapbox-to-css-font": "^2.4.0",
+            "webfont-matcher": "^1.1.0"
+          }
+        },
+        "quickselect": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
+          "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="
+        },
+        "rbush": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz",
+          "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==",
+          "requires": {
+            "quickselect": "^2.0.0"
+          }
+        }
+      }
+    },
     "ol-mapbox-style": {
       "version": "6.3.2",
       "resolved": "https://repo.huaweicloud.com/repository/npm/ol-mapbox-style/-/ol-mapbox-style-6.3.2.tgz",

+ 1 - 0
package.json

@@ -23,6 +23,7 @@
     "mxgraph": "^4.2.2",
     "normalize.css": "7.0.0",
     "nprogress": "0.2.0",
+    "ol": "^6.6.0",
     "path-to-regexp": "2.4.0",
     "q": "^1.5.1",
     "qs": "^6.9.0",

+ 4 - 4
src/api/base.js

@@ -54,7 +54,7 @@ export function deleteRole(params) {
 // 新增客户
 export function addUser(data) {
   return request({
-    url: '/base/user/saveNew',
+    url: '/base/user',
     method: 'post',
     data
   })
@@ -69,7 +69,7 @@ export function getSystemList() {
 // 修改客户
 export function editUser(data) {
   return request({
-    url: '/base/user/updateNew',
+    url: '/base/user',
     method: 'put',
     data
   })
@@ -114,8 +114,8 @@ export function setUserUnlock(data) {
 // 获取单位信息
 export function getCompany(data) {
   return request({
-    url_r: '/base/department/list',
-    url: '/tofly-admin/api.admin/v1/depts',
+    url: '/base/department/list',
+    //url: '/tofly-admin/api.admin/v1/depts',
     method: 'get',
     data
   })

+ 14 - 55
src/router/router.config.js

@@ -485,44 +485,36 @@ export const publicHouse = [
 
 // 权限系统
 export const sysSeting = [
+    
     {
-        path: '/permissionManagement',
+        path: '/systemSetting',
         type: 'sys',
         component: Layout,
         alwaysShow: true,
-        label: '权限管理',
-        meta: { title: '权限管理', icon: "iconfont icon-quanxian" },
+        label: '后台管理',
+        meta: { title: '后台管理', icon: "iconfont icon-shezhi" },
         children: [{
-            path: 'userManagement',
+            path: '/userManagement',
             name: 'userManagement',
             type: 'sys',
             component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
+                import('@/views/currentSystem/authorityManagement/userRights/index'),
             label: '用户管理',
             meta: { title: '用户管理' }
         }, {
-            path: 'roleManagement',
+            path: '/roleManagement',
             name: 'roleManagement',
             type: 'sys',
             component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
+                import('@/views/currentSystem/authorityManagement/rolePermission/index'),
             label: '角色管理',
             meta: { title: '角色管理' }
-        }]
-    },
-    {
-        path: '/systemSetting',
-        type: 'sys',
-        component: Layout,
-        alwaysShow: true,
-        label: '系统设置',
-        meta: { title: '系统设置', icon: "iconfont icon-shezhi" },
-        children: [{
+        },{
             path: 'organizationManagement',
             name: 'organizationManagement',
             type: 'sys',
             component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
+                import('@/views/currentSystem/authorityManagement/deptManagement/deptMng/index'),
             label: '组织架构',
             meta: { title: '组织架构' }
         }, {
@@ -530,52 +522,19 @@ export const sysSeting = [
             name: 'serviceConfManagement',
             type: 'sys',
             component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
+                import('@/views/currentSystem/authorityManagement/serviceConfig/index'),
             label: '服务配置',
             meta: { title: '服务配置' }
-        }]
-    },
-    {
-        path: '/systemManagement',
-        type: 'sys',
-        component: Layout,
-        alwaysShow: true,
-        label: '系统管理',
-        meta: { title: '系统管理', icon: "iconfont icon-xitongguanli" },
-        children: [{
+        },{
             path: 'userLog',
             name: 'userLog',
             type: 'sys',
             component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
+                import('@/views/currentSystem/authorityManagement/journal/index'),
             label: '用户日志',
             meta: { title: '用户日志' }
-        }, {
-            path: 'ststemManagementLog',
-            name: 'ststemManagementLog',
-            type: 'sys',
-            component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
-            label: '系统管理日志',
-            meta: { title: '系统管理日志' }
-        }, {
-            path: 'safetySecurityLog',
-            name: 'safetySecurityLog',
-            type: 'sys',
-            component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
-            label: '安全保密管理员日志',
-            meta: { title: '安全保密管理员日志' }
-        }, {
-            path: 'safetyAuditorLog',
-            name: 'safetyAuditorLog',
-            type: 'sys',
-            component: () =>
-                import('@/views/currentSystem/statisticalAnalysis/statisticalAnalysis/waterQualityOverview/index'),
-            label: '安全审计员日志',
-            meta: { title: '安全审计员日志' }
         }]
-    },
+    }
 ]
 
 export const meterReading = [{

+ 1 - 0
src/utils/auth.js

@@ -4,6 +4,7 @@ const TokenKey = 'token'
 
 // 获取token
 export function getToken() {
+  console.log(Cookies.get(TokenKey)+"-------------------------------------");
   return Cookies.get(TokenKey)
 }
 

+ 1 - 1
src/utils/request.js

@@ -5,7 +5,7 @@ import { getToken } from '@/utils/auth'
 import qs from 'qs'
 
 // 请求的url
-export const baseUrl = 'http://118.24.21.156:8089'
+export const baseUrl = 'http://localhost:1111'
 // 创建axios实例
 const service = axios.create({
   baseURL: baseUrl // url = base url + request url

+ 4 - 5
src/views/currentSystem/authorityManagement/rolePermission/index.vue

@@ -177,8 +177,7 @@ export default {
       dialogVisible: false,
       disabledEdit: true,
       total: 2,
-      list: [{code:'123',roleName:'测试角色权限1',roleDesc:'测试角色权限1'},{code:'122',roleName:'测试角色权限2',roleDesc:'测试角色权限3'}
-      ],
+      list: [],
       column: [
         {
           label: '角色名称',
@@ -194,7 +193,7 @@ export default {
         }
       ],
       //treeData: asyncRoutes,
-      treeData: sysMenu,
+      //treeData: sysMenu,
       defaultProps: {
         children: 'children',
         label: 'label'
@@ -236,8 +235,8 @@ export default {
     }
   },
   created() {
-    this.fetchData()
-    this.getSystemList()
+     this.fetchData()
+    // this.getSystemList()
   },
   methods: {
     // 获取角色列表

+ 3 - 5
src/views/currentSystem/authorityManagement/userRights/index.vue

@@ -32,8 +32,10 @@
             <el-button type="primary" size="small" @click="onSubmit">查询用户</el-button>
             <el-button type="primary" size="small" @click="handleAdded">新增用户</el-button>
             <el-button type="primary" size="small" :disabled="disabledEdit" @click="enableSettings">启用设置</el-button>
+           <!--
             <el-button type="primary" size="small" @click="templateDownload">模版下载</el-button>
             <el-button type="primary" size="small" @click="bulkImport">批量导入</el-button>
+            -->
             <input
               id="file"
               ref="files"
@@ -317,14 +319,13 @@ export default {
     this.fetchData(this.pagination)
     this.getCompanyInfo()
     this.getRoleInfo()
-    // const data = param2Obj('https://fz.bajiaohua.cn/?crowdfundId=9')
+    //const data = param2Obj('https://fz.bajiaohua.cn/?crowdfundId=9')
 
     console.log('/this', this.$store.state)
   },
   methods: {
     // 获取列表数据
     fetchData(data) {
-      console.log('2222211', data)
       this.listLoading = true
       getUserList(data).then(res => {
         this.list = res.result.records
@@ -355,20 +356,17 @@ export default {
     },
 
     handleCurrentChange(currentPage) {
-      // console.log('2222111')
       this.pagination.current = currentPage
       this.fetchData(this.pagination)
     },
 
     handleSizeChange(pagesize) {
-      // console.log('aaaa')
       this.pagination.size = pagesize
       this.fetchData(this.pagination)
     },
 
     handleSelectionChange(val) {
       this.multipleSelection = val
-      // console.log('1111', val)
     },
 
     // handleClick(val) {