Commit bdd20762 authored by lishangbu's avatar lishangbu

👽 Updating code due to external API changes.wrapper data with R from backend

parent dae0736c
{ {
"name": "avue-cli", "name": "pigx-ui",
"version": "2.0.0", "version": "1.8.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>Avue 通用管理 系统快速开发框架</title> <title>PigX微服务快速开发框架</title>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but avue2.0 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>很抱歉,如果没有 JavaScript 支持,网站将不能正常工作。请启用浏览器的 JavaScript 然后继续。</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
......
...@@ -150,7 +150,7 @@ const user = { ...@@ -150,7 +150,7 @@ const user = {
}) { }) {
return new Promise(resolve => { return new Promise(resolve => {
GetMenu().then((res) => { GetMenu().then((res) => {
const data = res.data const data = res.data.data
data.forEach(ele => { data.forEach(ele => {
addPath(ele); addPath(ele);
}) })
......
...@@ -79,8 +79,8 @@ export default { ...@@ -79,8 +79,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -86,8 +86,8 @@ ...@@ -86,8 +86,8 @@
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -89,8 +89,8 @@ export default { ...@@ -89,8 +89,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -101,8 +101,8 @@ ...@@ -101,8 +101,8 @@
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
})}, })},
......
...@@ -79,8 +79,8 @@ export default { ...@@ -79,8 +79,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
import { fetchTree, getObj, addObj, delObj, putObj } from '@/api/dept' import { fetchTree, getObj, addObj, delObj, putObj } from '@/api/dept'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'menu', name: 'dept',
data () { data () {
return { return {
list: null, list: null,
...@@ -146,15 +146,6 @@ export default { ...@@ -146,15 +146,6 @@ export default {
deptManager_btn_del: false deptManager_btn_del: false
} }
}, },
filters: {
typeFilter (type) {
const typeMap = {
0: '菜单',
1: '按钮'
}
return typeMap[type]
}
},
created () { created () {
this.getList() this.getList()
this.deptManager_btn_add = this.permissions['sys_dept_add'] this.deptManager_btn_add = this.permissions['sys_dept_add']
...@@ -170,7 +161,7 @@ export default { ...@@ -170,7 +161,7 @@ export default {
methods: { methods: {
getList () { getList () {
fetchTree(this.listQuery).then(response => { fetchTree(this.listQuery).then(response => {
this.treeData = response.data this.treeData = response.data.data
}) })
}, },
filterNode (value, data) { filterNode (value, data) {
...@@ -182,7 +173,7 @@ export default { ...@@ -182,7 +173,7 @@ export default {
this.formStatus = 'update' this.formStatus = 'update'
} }
getObj(data.id).then(response => { getObj(data.id).then(response => {
this.form = response.data this.form = response.data.data
}) })
this.currentId = data.id this.currentId = data.id
this.showElement = true this.showElement = true
...@@ -252,16 +243,7 @@ export default { ...@@ -252,16 +243,7 @@ export default {
}, },
resetForm () { resetForm () {
this.form = { this.form = {
permission: undefined,
name: undefined,
menuId: undefined,
parentId: this.currentId, parentId: this.currentId,
url: undefined,
icon: undefined,
sort: undefined,
component: undefined,
type: undefined,
method: undefined
} }
} }
} }
......
...@@ -79,8 +79,8 @@ export default { ...@@ -79,8 +79,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -87,8 +87,8 @@ export default { ...@@ -87,8 +87,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -209,7 +209,7 @@ export default { ...@@ -209,7 +209,7 @@ export default {
methods: { methods: {
getList () { getList () {
fetchTree(this.listQuery).then(response => { fetchTree(this.listQuery).then(response => {
this.treeData = response.data this.treeData = response.data.data
}) })
}, },
filterNode (value, data) { filterNode (value, data) {
...@@ -257,7 +257,7 @@ export default { ...@@ -257,7 +257,7 @@ export default {
this.formStatus = 'update' this.formStatus = 'update'
} }
getObj(data.id).then(response => { getObj(data.id).then(response => {
this.form = response.data this.form = response.data.data
}) })
this.currentId = data.id this.currentId = data.id
this.showElement = true this.showElement = true
......
...@@ -142,8 +142,8 @@ export default { ...@@ -142,8 +142,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.list = response.data.records this.list = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.listLoading = false this.listLoading = false
}) })
}, },
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
return fetchTree() return fetchTree()
}) })
.then(response => { .then(response => {
this.treeData = response.data this.form = response.data.data
// 解析出所有的太监节点 // 解析出所有的太监节点
this.checkedKeys = this.resolveAllEunuchNodeId(this.treeData, this.checkedKeys, []) this.checkedKeys = this.resolveAllEunuchNodeId(this.treeData, this.checkedKeys, [])
this.dialogStatus = 'permission' this.dialogStatus = 'permission'
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
this.dialogPermissionVisible = false this.dialogPermissionVisible = false
fetchTree() fetchTree()
.then(response => { .then(response => {
this.treeData = response.data this.form = response.data.data
return fetchRoleTree(roleId) return fetchRoleTree(roleId)
}) })
.then(response => { .then(response => {
......
...@@ -87,8 +87,8 @@ export default { ...@@ -87,8 +87,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -71,8 +71,8 @@ export default { ...@@ -71,8 +71,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
...@@ -157,19 +157,19 @@ export default { ...@@ -157,19 +157,19 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.list = response.data.records; this.list = response.data.data.records;
this.page.total = response.data.total this.page.total = response.data.data.total
this.listLoading = false; this.listLoading = false;
}); });
}, },
getNodeData (data) { getNodeData (data) {
deptRoleList().then(response => { deptRoleList().then(response => {
this.rolesOptions = response.data; this.rolesOptions = response.data.data;
}); });
}, },
handleDept () { handleDept () {
fetchDeptTree().then(response => { fetchDeptTree().then(response => {
this.treeDeptData = response.data; this.treeDeptData = response.data.data;
}); });
}, },
handleFilter (param) { handleFilter (param) {
......
...@@ -74,8 +74,8 @@ export default { ...@@ -74,8 +74,8 @@ export default {
page: page.currentPage, page: page.currentPage,
limit: page.pageSize limit: page.pageSize
}, params)).then(response => { }, params)).then(response => {
this.tableData = response.data.records this.tableData = response.data.data.records
this.page.total = response.data.total this.page.total = response.data.data.total
this.tableLoading = false this.tableLoading = false
}) })
}, },
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment