fix:后端返回数据获取
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -211,7 +211,7 @@ export default {
|
||||
const params = { pid: tree.dept_id }
|
||||
setTimeout(() => {
|
||||
crudDept.getDeptvo(params).then(res => {
|
||||
resolve(res.content)
|
||||
resolve(res.data)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
},
|
||||
getSupDepts(id) {
|
||||
crudDept.getDeptSuperior(id).then(res => {
|
||||
const date = res.content
|
||||
const date = res.data
|
||||
this.buildDepts(date)
|
||||
this.depts = date
|
||||
})
|
||||
@@ -248,7 +248,7 @@ export default {
|
||||
},
|
||||
getDepts() {
|
||||
crudDept.getDeptvo({ is_used: true }).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
this.depts = res.data.map(function(obj) {
|
||||
if (obj.has_children) {
|
||||
obj.children = null
|
||||
}
|
||||
@@ -260,7 +260,7 @@ export default {
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudDept.getDeptvo({ is_used: true, pid: parentNode.dept_id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
parentNode.children = res.data.map(function(obj) {
|
||||
obj.children = null
|
||||
return obj
|
||||
})
|
||||
|
||||
@@ -254,7 +254,7 @@ export default {
|
||||
const params = { pid: tree.menu_id }
|
||||
setTimeout(() => {
|
||||
crudMenu.getMenus(params).then(res => {
|
||||
resolve(res.content)
|
||||
resolve(res.data)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
|
||||
@@ -380,7 +380,7 @@ export default {
|
||||
const params = { pid: tree.menu_id, system_type: tree.system_type }
|
||||
setTimeout(() => {
|
||||
crudMenu.getMenus(params).then(res => {
|
||||
resolve(res.content)
|
||||
resolve(res.data)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
|
||||
@@ -163,7 +163,7 @@ export default {
|
||||
const params = { pid: tree.deptId }
|
||||
setTimeout(() => {
|
||||
crudDept.getDeptvo(params).then(res => {
|
||||
resolve(res.content)
|
||||
resolve(res.data)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
|
||||
@@ -537,9 +537,9 @@ export default {
|
||||
}
|
||||
crudDept.getDeptTree(q).then(res => {
|
||||
if (resolve) {
|
||||
resolve(res.content)
|
||||
resolve(res.data)
|
||||
} else {
|
||||
this.deptDatas = res.content
|
||||
this.deptDatas = res.data
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
@@ -548,13 +548,13 @@ export default {
|
||||
deptTree() {
|
||||
setTimeout(() => {
|
||||
crudDept.getDeptTree().then(res => {
|
||||
this.deptDatas = res.content
|
||||
this.deptDatas = res.data
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
getDepts() {
|
||||
crudDept.getDepts({ is_used: true }).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
this.depts = res.data.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
@@ -564,7 +564,7 @@ export default {
|
||||
},
|
||||
getSupDepts(deptId) {
|
||||
crudDept.getDeptSuperior(deptId).then(res => {
|
||||
const date = res.content
|
||||
const date = res.data
|
||||
this.buildDepts(date)
|
||||
this.depts = date
|
||||
})
|
||||
@@ -583,7 +583,7 @@ export default {
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudDept.getDeptvo({ is_used: true, pid: parentNode.dept_id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
parentNode.children = res.data.map(function(obj) {
|
||||
obj.children = null
|
||||
return obj
|
||||
})
|
||||
@@ -657,7 +657,7 @@ export default {
|
||||
// 部门权限
|
||||
openDeptDrawer(row) {
|
||||
crudDept.getDeptTree().then(res => {
|
||||
this.deptsDatas = res.content
|
||||
this.deptsDatas = res.data
|
||||
})
|
||||
this.openDrawer() // 打开抽屉
|
||||
this.drawerTitle = i18n.t('User.drawerTitle2')
|
||||
|
||||
@@ -315,7 +315,7 @@ export default {
|
||||
},
|
||||
getDepts() {
|
||||
getDepts({ enabled: true }).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
this.depts = res.data.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
@@ -348,7 +348,7 @@ export default {
|
||||
},
|
||||
getSupDepts(deptId) {
|
||||
getDeptSuperior(deptId).then(res => {
|
||||
const date = res.content
|
||||
const date = res.data
|
||||
this.buildDepts(date)
|
||||
this.depts = date
|
||||
})
|
||||
@@ -366,7 +366,7 @@ export default {
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
parentNode.children = res.data.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ export default {
|
||||
const params = { pid: tree.id }
|
||||
setTimeout(() => {
|
||||
crudClassstandard.getClass(params).then(res => {
|
||||
resolve(res.content)
|
||||
resolve(res.data)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
@@ -235,7 +235,7 @@ export default {
|
||||
},
|
||||
dataTypeChange(data) {
|
||||
crudClassstandard.getClass({ base_data_type: data }).then(res => {
|
||||
this.classes = res.content.map(function(obj) {
|
||||
this.classes = res.data.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
@@ -302,7 +302,7 @@ export default {
|
||||
loadClass({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
parentNode.children = res.data.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
||||
this.sects = res.content
|
||||
this.sects = res.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -355,7 +355,7 @@ export default {
|
||||
},
|
||||
getTaskStatusList() {
|
||||
crudSchBaseTask.getTaskStatusList().then(res => {
|
||||
this.taskStatusList = res.content
|
||||
this.taskStatusList = res.data
|
||||
})
|
||||
},
|
||||
getStatusName(code) {
|
||||
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
open() {
|
||||
this.crud.resetQuery(false)
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
this.sects = res.data
|
||||
})
|
||||
if (this.sect) {
|
||||
this.query.sect = this.sect
|
||||
|
||||
@@ -140,7 +140,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
||||
this.sects = res.content
|
||||
this.sects = res.data
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user