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 }
|
const params = { pid: tree.dept_id }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudDept.getDeptvo(params).then(res => {
|
crudDept.getDeptvo(params).then(res => {
|
||||||
resolve(res.content)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
@@ -231,7 +231,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getSupDepts(id) {
|
getSupDepts(id) {
|
||||||
crudDept.getDeptSuperior(id).then(res => {
|
crudDept.getDeptSuperior(id).then(res => {
|
||||||
const date = res.content
|
const date = res.data
|
||||||
this.buildDepts(date)
|
this.buildDepts(date)
|
||||||
this.depts = date
|
this.depts = date
|
||||||
})
|
})
|
||||||
@@ -248,7 +248,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getDepts() {
|
getDepts() {
|
||||||
crudDept.getDeptvo({ is_used: true }).then(res => {
|
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) {
|
if (obj.has_children) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
@@ -260,7 +260,7 @@ export default {
|
|||||||
loadDepts({ action, parentNode, callback }) {
|
loadDepts({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudDept.getDeptvo({ is_used: true, pid: parentNode.dept_id }).then(res => {
|
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
|
obj.children = null
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ export default {
|
|||||||
const params = { pid: tree.menu_id }
|
const params = { pid: tree.menu_id }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudMenu.getMenus(params).then(res => {
|
crudMenu.getMenus(params).then(res => {
|
||||||
resolve(res.content)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ export default {
|
|||||||
const params = { pid: tree.menu_id, system_type: tree.system_type }
|
const params = { pid: tree.menu_id, system_type: tree.system_type }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudMenu.getMenus(params).then(res => {
|
crudMenu.getMenus(params).then(res => {
|
||||||
resolve(res.content)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ export default {
|
|||||||
const params = { pid: tree.deptId }
|
const params = { pid: tree.deptId }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudDept.getDeptvo(params).then(res => {
|
crudDept.getDeptvo(params).then(res => {
|
||||||
resolve(res.content)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -537,9 +537,9 @@ export default {
|
|||||||
}
|
}
|
||||||
crudDept.getDeptTree(q).then(res => {
|
crudDept.getDeptTree(q).then(res => {
|
||||||
if (resolve) {
|
if (resolve) {
|
||||||
resolve(res.content)
|
resolve(res.data)
|
||||||
} else {
|
} else {
|
||||||
this.deptDatas = res.content
|
this.deptDatas = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -548,13 +548,13 @@ export default {
|
|||||||
deptTree() {
|
deptTree() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudDept.getDeptTree().then(res => {
|
crudDept.getDeptTree().then(res => {
|
||||||
this.deptDatas = res.content
|
this.deptDatas = res.data
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
getDepts() {
|
getDepts() {
|
||||||
crudDept.getDepts({ is_used: true }).then(res => {
|
crudDept.getDepts({ is_used: true }).then(res => {
|
||||||
this.depts = res.content.map(function(obj) {
|
this.depts = res.data.map(function(obj) {
|
||||||
if (obj.hasChildren) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
@@ -564,7 +564,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getSupDepts(deptId) {
|
getSupDepts(deptId) {
|
||||||
crudDept.getDeptSuperior(deptId).then(res => {
|
crudDept.getDeptSuperior(deptId).then(res => {
|
||||||
const date = res.content
|
const date = res.data
|
||||||
this.buildDepts(date)
|
this.buildDepts(date)
|
||||||
this.depts = date
|
this.depts = date
|
||||||
})
|
})
|
||||||
@@ -583,7 +583,7 @@ export default {
|
|||||||
loadDepts({ action, parentNode, callback }) {
|
loadDepts({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudDept.getDeptvo({ is_used: true, pid: parentNode.dept_id }).then(res => {
|
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
|
obj.children = null
|
||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
@@ -657,7 +657,7 @@ export default {
|
|||||||
// 部门权限
|
// 部门权限
|
||||||
openDeptDrawer(row) {
|
openDeptDrawer(row) {
|
||||||
crudDept.getDeptTree().then(res => {
|
crudDept.getDeptTree().then(res => {
|
||||||
this.deptsDatas = res.content
|
this.deptsDatas = res.data
|
||||||
})
|
})
|
||||||
this.openDrawer() // 打开抽屉
|
this.openDrawer() // 打开抽屉
|
||||||
this.drawerTitle = i18n.t('User.drawerTitle2')
|
this.drawerTitle = i18n.t('User.drawerTitle2')
|
||||||
|
|||||||
@@ -315,7 +315,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getDepts() {
|
getDepts() {
|
||||||
getDepts({ enabled: true }).then(res => {
|
getDepts({ enabled: true }).then(res => {
|
||||||
this.depts = res.content.map(function(obj) {
|
this.depts = res.data.map(function(obj) {
|
||||||
if (obj.hasChildren) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getSupDepts(deptId) {
|
getSupDepts(deptId) {
|
||||||
getDeptSuperior(deptId).then(res => {
|
getDeptSuperior(deptId).then(res => {
|
||||||
const date = res.content
|
const date = res.data
|
||||||
this.buildDepts(date)
|
this.buildDepts(date)
|
||||||
this.depts = date
|
this.depts = date
|
||||||
})
|
})
|
||||||
@@ -366,7 +366,7 @@ export default {
|
|||||||
loadDepts({ action, parentNode, callback }) {
|
loadDepts({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
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) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ export default {
|
|||||||
const params = { pid: tree.id }
|
const params = { pid: tree.id }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
crudClassstandard.getClass(params).then(res => {
|
crudClassstandard.getClass(params).then(res => {
|
||||||
resolve(res.content)
|
resolve(res.data)
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
@@ -235,7 +235,7 @@ export default {
|
|||||||
},
|
},
|
||||||
dataTypeChange(data) {
|
dataTypeChange(data) {
|
||||||
crudClassstandard.getClass({ base_data_type: data }).then(res => {
|
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) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
@@ -302,7 +302,7 @@ export default {
|
|||||||
loadClass({ action, parentNode, callback }) {
|
loadClass({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||||
parentNode.children = res.content.map(function(obj) {
|
parentNode.children = res.data.map(function(obj) {
|
||||||
if (obj.hasChildren) {
|
if (obj.hasChildren) {
|
||||||
obj.children = null
|
obj.children = null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getTaskStatusList() {
|
getTaskStatusList() {
|
||||||
crudSchBaseTask.getTaskStatusList().then(res => {
|
crudSchBaseTask.getTaskStatusList().then(res => {
|
||||||
this.taskStatusList = res.content
|
this.taskStatusList = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getStatusName(code) {
|
getStatusName(code) {
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export default {
|
|||||||
open() {
|
open() {
|
||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.data
|
||||||
})
|
})
|
||||||
if (this.sect) {
|
if (this.sect) {
|
||||||
this.query.sect = this.sect
|
this.query.sect = this.sect
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
crudSectattr.getSect({ 'stor_id': '' }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
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