系统管理联调

master
wangmeng 3 months ago
parent d44d6ad5fb
commit f0cec44ed8
  1. 2
      src/api/system/menu.js
  2. 9
      src/api/system/role.js
  3. 1
      src/page/index/index.vue
  4. 2
      src/page/index/top/top-menu.vue
  5. 2
      src/store/modules/dict.js
  6. 5
      src/store/modules/user.js
  7. 2
      src/views/authority/apiscope.vue
  8. 2
      src/views/authority/datascope.vue
  9. 34
      src/views/authority/role.vue
  10. 2
      src/views/firstOrder/inbound.vue
  11. 1
      src/views/system/dict.vue

@ -98,7 +98,7 @@ export const getTopMenu = () => request({
});
export const getRoutes = (topMenuId) => request({
url: '/api/blade-system/menu/routes',
url: '/smartpark/menu/routes',
method: 'get',
params: {
topMenuId,

@ -13,14 +13,15 @@ export const getList = (current, size, params) => {
}
export const grantTree = () => {
return request({
url: '/api/blade-system/menu/grant-tree',
url: '/smartpark/menu/grant-tree',
method: 'get',
})
}
export const grant = (roleIds, menuIds, dataScopeIds, apiScopeIds) => {
return request({
url: '/api/blade-system/role/grant',
url: '/smartpark/role/grant',
method: 'post',
data: {
roleIds,
@ -60,7 +61,7 @@ export const update = (row) => {
export const getRole = (roleIds) => {
return request({
url: '/api/blade-system/menu/role-tree-keys',
url: '/smartpark/menu/role-tree-keys',
method: 'get',
params: {
roleIds,
@ -70,7 +71,7 @@ export const getRole = (roleIds) => {
export const getRoleTree = (tenantId) => {
return request({
url: '/api/blade-system/role/tree',
url: '/smartpark/role/tree',
method: 'get',
params: {
tenantId,

@ -88,6 +88,7 @@
},
//
openMenu(item = {}) {
console.log("itemitemitemopenMenu", item)
this.$store.dispatch("GetMenu", item.id).then(data => {
if (data.length !== 0) {
this.$router.$avueRouter.formatRoutes(data, true);

@ -45,12 +45,14 @@
},
methods: {
openHome(itemHome) {
this.index.openMenu(itemHome);
this.$router.push({
path: this.$router.$avueRouter.getPath({name: itemHome.name, src: ''}, {})
});
},
openMenu(item) {
console.log("openMenu", item)
this.index.openMenu(item)
},
getMenu() {

@ -10,7 +10,7 @@ const dict = {
FlowRoutes({commit}) {
return new Promise((resolve, reject) => {
getDictionary({code: 'flow'}).then(res => {
commit('SET_FLOW_ROUTES', res.data.data);
commit('SET_FLOW_ROUTES', res.data.result || []);
resolve();
}).catch(error => {
reject(error)

@ -253,10 +253,11 @@ const user = {
})
},
//获取系统菜单
GetMenu({commit, dispatch}, topMenuId) {
GetMenu({ commit, dispatch }, topMenuId) {
console.log("")
return new Promise(resolve => {
getRoutes(topMenuId).then((res) => {
const data = res.data.data
const data = res.data.result
let menu = deepClone(data);
menu.forEach(ele => {
addPath(ele, true);

@ -506,7 +506,7 @@
onLoad(page, params = {}) {
this.loading = true;
getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
this.data = res.data.data;
this.data = res.data.result;
this.loading = false;
this.selectionClear();
});

@ -552,7 +552,7 @@ export default {
onLoad(page, params = {}) {
this.loading = true;
getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
this.data = res.data.data;
this.data = res.data.result;
this.loading = false;
this.selectionClear();
});

@ -312,9 +312,11 @@ export default {
});
},
submit() {
const menuList = this.$refs.treeMenu.getCheckedKeys();
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
const menuList = this.$refs.treeMenu ? this.$refs.treeMenu.getCheckedKeys() : [];
const dataScopeList = this.$refs.treeDataScope ? this.$refs.treeDataScope.getCheckedKeys() : [];
const apiScopeList = this.$refs.treeApiScope ? this.$refs.treeApiScope.getCheckedKeys() : [];
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
this.box = false;
this.$message({
@ -411,13 +413,14 @@ export default {
this.dataScopeTreeObj = [];
this.apiScopeTreeObj = [];
grantTree().then((res) => {
this.menuGrantList = res.data.data.menu;
this.dataScopeGrantList = res.data.data.dataScope;
this.apiScopeGrantList = res.data.data.apiScope;
const data = res.data.result
this.menuGrantList = data.menu;
this.dataScopeGrantList = data.dataScope || [];
this.apiScopeGrantList = data.apiScope || [];
getRole(this.ids).then((res) => {
this.menuTreeObj = res.data.data.menu;
this.dataScopeTreeObj = res.data.data.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope;
this.menuTreeObj = res.data.result.menu;
this.dataScopeTreeObj = res.data.result.dataScope || [];
this.apiScopeTreeObj = res.data.result.apiScope || [];
this.box = true;
});
});
@ -427,13 +430,14 @@ export default {
this.dataScopeTreeObj = [];
this.apiScopeTreeObj = [];
grantTree().then((res) => {
this.menuGrantList = res.data.data.menu;
this.dataScopeGrantList = res.data.data.dataScope;
this.apiScopeGrantList = res.data.data.apiScope;
const data = res.data.result
this.menuGrantList = data.menu;
this.dataScopeGrantList = data.dataScope || [];
this.apiScopeGrantList = data.apiScope || [];
getRole(row.id).then((res) => {
this.menuTreeObj = res.data.data.menu;
this.dataScopeTreeObj = res.data.data.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope;
this.menuTreeObj = res.data.result.menu;
this.dataScopeTreeObj = res.data.result.dataScope;
this.apiScopeTreeObj = res.data.result.apiScope;
this.selectionList.push(row);
this.box = true;
});

@ -135,7 +135,7 @@ export default {
width: 180,
headerAlign: "center",
align: "center",
slot: "purchaseEndInfo"
slot: "purchaseEndInfo",
width: 150,
align: "center",
formatter: (row, column) => {

@ -339,6 +339,7 @@ export default {
})
.then(() => {
this.onLoadChild(this.pageChild);
this.$refs.crudChild.refresh();
this.$message({
type: "success",
message: "操作成功!"

Loading…
Cancel
Save