Commit 2e62cb12 by qiaoyanqi

报错解决

parent f491bbf4
...@@ -218,7 +218,7 @@ export default { ...@@ -218,7 +218,7 @@ export default {
const treeRes = await this.getBaseData(treePostData, '/baseData/data/tree') const treeRes = await this.getBaseData(treePostData, '/baseData/data/tree')
getTreeDataMap(treeRes.data.rows) getTreeDataMap(treeRes.data.rows)
treeData = treeRes.data.rows[0] treeData = treeRes.data.rows[0]
groupname = treeRes.data.rows[0].attributes.objectcode groupname = treeRes.data.rows[0] && treeRes.data.rows[0].attributes.objectcode
} }
// 基础数据类型为分组列表时 // 基础数据类型为分组列表时
if (this.structtype === 1) { if (this.structtype === 1) {
...@@ -229,7 +229,7 @@ export default { ...@@ -229,7 +229,7 @@ export default {
if (item && item.attributes && item.attributes.objectcode) { if (item && item.attributes && item.attributes.objectcode) {
objectCodes.push(item.attributes.objectcode) objectCodes.push(item.attributes.objectcode)
} }
if (item.children && item.children.length > 0) { if (item && item.children && item.children.length > 0) {
getGroupNames(item.children) getGroupNames(item.children)
} }
}) })
......
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