diff --git a/src/api/system/purviewManage/purviewManage.js b/src/api/system/purviewManage/purviewManage.js new file mode 100644 index 0000000..03090d2 --- /dev/null +++ b/src/api/system/purviewManage/purviewManage.js @@ -0,0 +1,50 @@ +import request from '@/utils/request' +// 权限组接口文档 +export default { + // 查询分页列表 + listPage: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/purviewManage/pageList', + method: 'POST', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 新增、保存 + savePurviewManage: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/base/apiadmin/purviewManage/saveOrUpdate', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + + // 删除 + deleteBySid: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/purviewManage/delete/' + data, + method: 'DELETE', + }) + }, + + // 查询所有权限组列表 + getPurviewManageListAll: function(params) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/purviewManage/listAll', + method: 'post', + data: params, + }) + }, + +} diff --git a/src/api/system/resourcesManage/resourcesManage.js b/src/api/system/resourcesManage/resourcesManage.js new file mode 100644 index 0000000..21e2940 --- /dev/null +++ b/src/api/system/resourcesManage/resourcesManage.js @@ -0,0 +1,50 @@ +import request from '@/utils/request' +// 资源 接口文档 +export default { + // 查询分页列表 + listPage: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/resourcesManage/pageList', + method: 'POST', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 新增、保存 + savereSourcesManage: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/base/apiadmin/resourcesManage/saveOrUpdate', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + + // 删除 + deleteBySid: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/resourcesManage/delete/' + data, + method: 'DELETE', + }) + }, + + // 查询所有资源列表 + getresourcesManageListAll: function(params) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/resourcesManage/listAll', + method: 'post', + data: params, + }) + }, + +} diff --git a/src/api/system/unitAuthorizeManage/unitAuthorizeManage.js b/src/api/system/unitAuthorizeManage/unitAuthorizeManage.js new file mode 100644 index 0000000..3269a6d --- /dev/null +++ b/src/api/system/unitAuthorizeManage/unitAuthorizeManage.js @@ -0,0 +1,31 @@ +import request from '@/utils/request' +// 单位授权 接口文档 +export default { + // 查询分页列表 + listPage: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/baes/apiadmin/unitAuthorizeManage/pageList', + method: 'POST', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + + // 保存权限组 + savePurviewManage: function(data) { + return request({ + baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", + url: '/base/apiadmin/unitAuthorizeManage/savePurviewManage', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + +} diff --git a/src/assets/loginImg/logo.png b/src/assets/loginImg/logo.png index fea5aa5..1da54e4 100644 Binary files a/src/assets/loginImg/logo.png and b/src/assets/loginImg/logo.png differ diff --git a/src/views/system/purviewManage/purviewManage.vue b/src/views/system/purviewManage/purviewManage.vue index 02409e3..8a311c5 100644 --- a/src/views/system/purviewManage/purviewManage.vue +++ b/src/views/system/purviewManage/purviewManage.vue @@ -1,8 +1,238 @@ - \ No newline at end of file + diff --git a/src/views/system/resourcesManage/resourcesManage.vue b/src/views/system/resourcesManage/resourcesManage.vue index 02409e3..02bf19f 100644 --- a/src/views/system/resourcesManage/resourcesManage.vue +++ b/src/views/system/resourcesManage/resourcesManage.vue @@ -1,8 +1,238 @@ - \ No newline at end of file + diff --git a/src/views/system/unitAuthorizeManage/unitAuthorizeManage.vue b/src/views/system/unitAuthorizeManage/unitAuthorizeManage.vue index 02409e3..3301ecc 100644 --- a/src/views/system/unitAuthorizeManage/unitAuthorizeManage.vue +++ b/src/views/system/unitAuthorizeManage/unitAuthorizeManage.vue @@ -1,8 +1,231 @@ + import req from '@/api/system/unitAuthorizeManage/unitAuthorizeManage.js' + import req2 from '@/api/system/purviewManage/purviewManage.js' + import ButtonBar from '@/components/ButtonBar' + import Pagination from '@/components/pagination' + import pageye from '@/components/pagination/pageye' + export default { + components: { + ButtonBar, + Pagination, + pageye, + }, + data() { + return { + btndisabled: false, + viewState: 1, // 1、列表 2、添加 3、修改 4、查看 + isSearchShow: false, + searchxianshitit: '显示查询条件', + tableLoading: false, + dataList: [], + btnList: [{ + type: 'info', + size: 'small', + icon: 'cross', + btnKey: 'doClose', + btnLabel: '关闭' + }], + queryParams: { + current: 1, + size: 10, + total: 0, + params: { + name: '' + } + }, + roleDialog: false, + roleForm: { + roleSid: [], + unitSid: '' + }, + roleList: [] + } + }, + mounted() { + this.$refs['btnbar'].setButtonList(this.btnList) + }, + created() { + this.loadList() + this.init() + }, + methods: { + init() { + req2.getPurviewManageListAll().then(res => { + this.roleList = res.data + }) + }, + // 搜索条件效果 + clicksearchShow() { + this.isSearchShow = !this.isSearchShow + if (this.isSearchShow) { + this.searchxianshitit = '隐藏查询条件' + } else { + this.searchxianshitit = '显示查询条件' + } + }, + btnHandle(btnKey) { + switch (btnKey) { + case 'doClose': + this.doClose() + break + default: + break + } + }, + loadList() { + this.tableLoading = true + req.listPage(this.queryParams).then((resp) => { + this.tableLoading = false + if (resp.success) { + const data = resp.data + this.queryParams.total = data.total + this.dataList = data.records + } else { + // 根据resp.code进行异常情况处理 + this.dataList = [] + this.queryParams.total = 0 + } + }).catch(() => { + this.tableLoading = false + }) + }, + + // 序号 + indexMethod(index) { + var pagestart = (this.queryParams.current - 1) * this.queryParams.size + var pageindex = index + 1 + pagestart + return pageindex + }, + dosearch() { + this.queryParams.current = 1 + this.loadList() + }, + resetQuery() { + this.queryParams = { + current: 1, + size: 10, + total: 0, + params: { + name: '' + } + } + this.loadList() + }, + toRelevancy(row) { + + this.roleDialog = true + + this.roleForm.unitSid = row.sid + this.roleForm.roleSid = row.purviewsList - \ No newline at end of file + }, + + saveRole() { + + console.log("saveRole", this.roleForm); + + req.savePurviewManage(this.roleForm).then(res => { + this.loadList() + this.closeDialog() + }) + + }, + closeDialog() { + this.roleDialog = false + this.roleForm = { + roleSid: [], + unitSid: '' + } + } + } + } + +