/**获取导出实例 */async getAllInstances(SlotId) {//SlotId 数据库词槽idlet result:any = [] //导出的数据模块const allData = await this.getSimpleInstance(SlotId)//allData根据数据库词槽ID查询到的树状结构数据let count = 1//fn 是递归的函数let fn = (data, objc,count) => {let obj:any = {...objc}obj[`name${count}`] = data.nameobj.otherName = data.otherNameresult.push(obj)count++if (data.children) {for (const val of data.children) {fn(val, obj,count)}}}if (allData.length !== 0) {for (const item of allData) {fn(item, {}, count)}}return result}