diff --git a/package-lock.json b/package-lock.json index ca82914f9b263257d9e81d1b6e0d09c5ce927b28..cb8962c7073ce59b9381d3b6f5a99769fe41b8f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10665,11 +10665,6 @@ "integrity": "sha1-HuO8mhbsv1EYvjNLsV+cRvgvWCU=", "dev": true }, - "vuex": { - "version": "3.1.2", - "resolved": "https://registry.npm.taobao.org/vuex/download/vuex-3.1.2.tgz", - "integrity": "sha1-ooY/QAWqc/JYflXD+t8/AfacfU0=" - }, "warning": { "version": "4.0.3", "resolved": "https://registry.npm.taobao.org/warning/download/warning-4.0.3.tgz", diff --git a/package.json b/package.json index 3cb2b85a30e41e6b31cf26e8f2e2f99f02f47196..d4f20a89f83c4fdc3e856737f6a638254c5f1908 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,7 @@ "dingtalk-jsapi": "^2.9.14", "nprogress": "^0.2.0", "vue": "^2.6.11", - "vue-router": "^3.1.5", - "vuex": "^3.1.2" + "vue-router": "^3.1.5" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.2.0", diff --git a/src/components/common/page/MyPage.vue b/src/components/common/page/MyPage.vue index e91fe7652e2d1313c9ce177a317aa3042cbcc2f3..99316a3caff2e7b21df63bc8dc6e6fc878e7f98b 100644 --- a/src/components/common/page/MyPage.vue +++ b/src/components/common/page/MyPage.vue @@ -2,6 +2,7 @@
item.hasOwnProperty('children')) - return [obj.children[0].key] + if(obj){ + return [obj.children[0].key] + }else{ + return [this.menuList[0].key] + } + }, openMenu() { let obj = this.menuList.find(item => item.hasOwnProperty('children')) - return [obj.key] + if(obj){ + return [obj.key] + }else{ + return [] + } } } } diff --git a/src/components/modal/modalPermission/EditTree.vue b/src/components/modal/modalPermission/EditTree.vue index afc243a9f3abb11ad305384949176bb98aeefc1e..f914cd6ff2edc6a28f76bd0500cc8846dd096a31 100644 --- a/src/components/modal/modalPermission/EditTree.vue +++ b/src/components/modal/modalPermission/EditTree.vue @@ -66,7 +66,7 @@ } }, created(){ - console.log(this.name) + }, } @@ -74,6 +74,6 @@ \ No newline at end of file diff --git a/src/components/modal/modalPermission/NewGroup.vue b/src/components/modal/modalPermission/NewGroup.vue index 02e70f89c05efc77c96ec08c0bf4912acc4a5887..161bcfca6118d917b8638a9cda7d46a95ce697ba 100644 --- a/src/components/modal/modalPermission/NewGroup.vue +++ b/src/components/modal/modalPermission/NewGroup.vue @@ -61,6 +61,6 @@ \ No newline at end of file diff --git a/src/components/modal/modalPermission/newRole.vue b/src/components/modal/modalPermission/newRole.vue new file mode 100644 index 0000000000000000000000000000000000000000..9f6444de3a801ee8550233f3c949e7e19ead5be5 --- /dev/null +++ b/src/components/modal/modalPermission/newRole.vue @@ -0,0 +1,88 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 539b0e6985322feb51510594b70f0be3f97f2a13..76666ad5d98a63f9f298c804b501d729ec401e84 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,6 @@ import Vue from 'vue' import App from './App.vue' import router from './router' -import store from './store' import Antd from 'ant-design-vue'; import 'ant-design-vue/dist/antd.css' @@ -15,6 +14,5 @@ Vue.use(Antd); new Vue({ router, - store, render: h => h(App) }).$mount('#app') diff --git a/src/netWork/login.js b/src/netWork/login.js index 6912920059cf9924de6cd50601007d6e1e79e777..25bfb9ce36366add685738f059cad50e96d67328 100644 --- a/src/netWork/login.js +++ b/src/netWork/login.js @@ -15,7 +15,7 @@ export function login(code,corpId) { } export function getUserData() { return request({ - url:'/api-user/users/current', + url:'/api-user/users/getCurrentUserDto', method:'get' }) } \ No newline at end of file diff --git a/src/netWork/organ.js b/src/netWork/organ.js index e5400122933f421eeb22f71bafdc5416f0cdda16..f0c772eff39843f548386641d1e5598d2d6353f1 100644 --- a/src/netWork/organ.js +++ b/src/netWork/organ.js @@ -1,10 +1,10 @@ import {request} from "./request"; -export function getRootOrgan(corpId) { +export function getRootOrgan(orgId ) { return request({ - url:'/api-user/dept/findRootDeptByParentId', + url:'/api-user/dept/findRootDeptByOrgId', method:'get', params:{ - corpId + orgId } }) } diff --git a/src/netWork/request.js b/src/netWork/request.js index af164a79c049bd615045dd59e0ee1d10bea54249..a70f95da23c63e622f2aed1ed234d19bfd4b96df 100644 --- a/src/netWork/request.js +++ b/src/netWork/request.js @@ -1,7 +1,6 @@ import axios from 'axios' import NProgress from 'nprogress' import 'nprogress/nprogress.css' -import store from '../store' import router from "../router"; export function request(config) { const instance = axios.create({ @@ -11,11 +10,15 @@ export function request(config) { instance.interceptors.request.use( config => { NProgress.start() // 设置加载进度条(开始..) - let token = store.getters.getAssToken + if(config.url === '/api-oauth/oauth/openId/token'){ + return config + }else{ + let token = localStorage.getItem('assToken') if (token) { - config.headers.Authorization = 'Bearer '+token; + config.headers.Authorization = 'Bearer '+token; } return config + } }, error => { return Promise.reject(error) @@ -25,23 +28,23 @@ export function request(config) { NProgress.done() return res.data },error => { - if (error.response.status === 401) { - router.replace({ - name:'notFind', - params:{ - name:'notauth' - } - }) - }else{ - router.replace({ - name:'notFind', - }) - } + // if (error.response.status === 401) { + // router.replace({ + // name:'notFind', + // params:{ + // name:'notauth' + // } + // }) + // }else{ + // router.replace({ + // name:'notFind', + // }) + // } console.log(error) NProgress.done() - // router.push({ - // name:'notFind' - // }) + router.push({ + name:'notFind' + }) }) return instance(config) diff --git a/src/router/index.js b/src/router/index.js index b0d0a9d338906a6d32f8d7223adf4cbcac8015a2..702aa93b110d4a962f43a2e78e81882f6afb1708 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,7 +1,10 @@ import Vue from 'vue' import VueRouter from 'vue-router' import Loading from "../views/loading/Loading"; - +const routerPush = VueRouter.prototype.push +VueRouter.prototype.push = function push(location) { + return routerPush.call(this, location).catch(error=> error) +} Vue.use(VueRouter) const routes = [ diff --git a/src/store/index.js b/src/store/index.js deleted file mode 100644 index ac47855bb98ba13f6ab268ff4c3d4dce70222c2c..0000000000000000000000000000000000000000 --- a/src/store/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import Vue from 'vue' -import Vuex from 'vuex' - -Vue.use(Vuex) - -export default new Vuex.Store({ - state: { - user:{}, - tokens:{ - assToken:'', - refToken:'' - }, - cropId:'' - }, - getters:{ - getCropId(state){ - return state.cropId - }, - getAssToken(state){ - return state.tokens.assToken - }, - getOrganId(state){ - return state.user.sysOrganization.id - } - }, - mutations: { - setCropId(state,id){ - state.cropId = id - }, - setAssToken(state,token){ - state.tokens.assToken = token - }, - setUser(state,user){ - state.user = user - } - }, - actions: { - computerID(context,id){ - /* - * - * - * - * */ - } - }, - modules: { - } -}) diff --git a/src/views/config/Config.vue b/src/views/config/Config.vue index 9e3f3565ab18e3883562b51b0b3bb646d91effd4..e64b65cad8f8394f4b5d0c523333a245508cf915 100644 --- a/src/views/config/Config.vue +++ b/src/views/config/Config.vue @@ -20,25 +20,31 @@ key: '/config/organ', title: '组织管理' }, - { - key: '/config/role', - title: '角色管理' - }, - { - key: '/config/permission', - title: '权限管理' - }, + { key: '/config/apply', title: '应用管理' }, - { - key: '/config/addressBook', - title: '家校通讯录' - } - ] - } + }, + { + key:'2', + title:'后台管理', + children: [ + { + key: '/config/role', + title: '部门管理' + }, + { + key: '/config/permission', + title: '权限管理' + }, + { + key: '/config/addressBook', + title: '家校通讯录' + } + ] + } ] } }, diff --git a/src/views/config/apply/ConApply.vue b/src/views/config/apply/ConApply.vue index c310f971df5ce380f2424cd8492078772853260e..ad7f3f32cd87e8eef571afb493faa17df4578b28 100644 --- a/src/views/config/apply/ConApply.vue +++ b/src/views/config/apply/ConApply.vue @@ -3,7 +3,7 @@
应用名称: - + 查询 重置
@@ -117,10 +117,9 @@ padding-right: 24px; } .top{ - height: 70px; - line-height: 70px; + height: 60px; + line-height: 60px; .border-btm(); - } .query{ margin-left:3%; diff --git a/src/views/config/organ/ConOrgan.vue b/src/views/config/organ/ConOrgan.vue index c13148313edc015da1504bfe4966aa8dfaa2878a..14ef4c04597a62142e5895eddb9c31a736d806cc 100644 --- a/src/views/config/organ/ConOrgan.vue +++ b/src/views/config/organ/ConOrgan.vue @@ -110,9 +110,11 @@ } }, + created(){ // this.getTabData(0,10) }, + computed: { rowSelection() { const {selectedRowKeys} = this; diff --git a/src/views/config/organ/children/QueryHead.vue b/src/views/config/organ/children/QueryHead.vue index 425945bb6cfc12ecc3a67989423aa0a43fba784e..eb4ae3f61e64dc05c9692fb6aa211e7749181f36 100644 --- a/src/views/config/organ/children/QueryHead.vue +++ b/src/views/config/organ/children/QueryHead.vue @@ -3,13 +3,12 @@ - + 查询 - - - 重置 + 重置
@@ -41,5 +40,11 @@ display: flex; align-items: center; .border-btm(); + .operation{ + margin-left: 15px; + .reset{ + margin-left: 10px; + } + } } \ No newline at end of file diff --git a/src/views/config/permission/Permission.vue b/src/views/config/permission/Permission.vue index bca31a48697e9d31129bcbc9d712ee1af32791ee..0e2851c2d01455471817c63271c17d0cb3cffce1 100644 --- a/src/views/config/permission/Permission.vue +++ b/src/views/config/permission/Permission.vue @@ -3,7 +3,7 @@
-
新增角色
+
新增角色
新建分组
@@ -11,206 +11,147 @@ :treeData="groupData" showIcon :replaceFields="{children:'roles', title:'name',key:'key'}" - :defaultExpandedKeys="['0']" + :defaultExpandedKeys="['0-0']" + :defaultSelectedKeys="['0-0']" @select="selectTree" > - + - -
-
-
-
{{user.name}} - 编辑
-
- - - - - - - - - - -
+ + - +
\ No newline at end of file diff --git a/src/views/config/permission/children/OtherUser.vue b/src/views/config/permission/children/OtherUser.vue new file mode 100644 index 0000000000000000000000000000000000000000..f08559358c529fb99d67774e3c39729070f1dfde --- /dev/null +++ b/src/views/config/permission/children/OtherUser.vue @@ -0,0 +1,164 @@ + + + + + \ No newline at end of file diff --git a/src/views/config/permission/children/admin.vue b/src/views/config/permission/children/admin.vue new file mode 100644 index 0000000000000000000000000000000000000000..65af947f16c0d464f2fc5b5d434a896d4b300c2e --- /dev/null +++ b/src/views/config/permission/children/admin.vue @@ -0,0 +1,143 @@ + + + + + \ No newline at end of file diff --git a/src/views/config/permission/children/childAdmin.vue b/src/views/config/permission/children/childAdmin.vue new file mode 100644 index 0000000000000000000000000000000000000000..fc9ae6c440a750353f999cd0d0baaff4e3d4d5f2 --- /dev/null +++ b/src/views/config/permission/children/childAdmin.vue @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/src/views/config/role/Role.vue b/src/views/config/role/Role.vue index 9add99e174652e81d817184d40fb477a90dd26b1..3091d0f4f44b793df4b71f4d2effc072238f7416 100644 --- a/src/views/config/role/Role.vue +++ b/src/views/config/role/Role.vue @@ -1,5 +1,5 @@