lambo-design-bi 0.0.163 → 0.0.165
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
getWidgetName,
|
|
47
47
|
getConfig() {
|
|
48
48
|
// 从路由参数中获取pageId
|
|
49
|
-
console.log("child-page-tm getConfig this.$route
|
|
49
|
+
console.log("child-page-tm getConfig this.$route:", this.$route)
|
|
50
50
|
this.pageId = this.$route.query.pageId || ''
|
|
51
51
|
if (!this.pageId) {
|
|
52
52
|
console.error("pageId为空,请检查菜单配置:", this.pageId)
|
|
@@ -79,10 +79,25 @@ export default {
|
|
|
79
79
|
})
|
|
80
80
|
},
|
|
81
81
|
goBack() {
|
|
82
|
-
this.$
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
let routeConfig = this.$route || {}
|
|
83
|
+
console.log("child-page-tm goBack routeConfig:", routeConfig)
|
|
84
|
+
let parentRouteName = null
|
|
85
|
+
if (routeConfig && routeConfig.meta && routeConfig.meta.crumbs) {
|
|
86
|
+
let crumbs = routeConfig.meta.crumbs
|
|
87
|
+
if (crumbs && crumbs.length > 1) {
|
|
88
|
+
let parentRoute = crumbs[crumbs.length - 2]
|
|
89
|
+
if (parentRoute) {
|
|
90
|
+
parentRouteName = parentRoute.name || null
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (parentRouteName) {
|
|
95
|
+
console.log("child-page-tm goBack parentRouteName:", parentRouteName)
|
|
96
|
+
this.$router.push({ name: parentRouteName })
|
|
97
|
+
} else {
|
|
98
|
+
console.log("child-page-tm goBack history.back()")
|
|
99
|
+
this.$router.go(-1)
|
|
100
|
+
}
|
|
86
101
|
},
|
|
87
102
|
initSearch() {
|
|
88
103
|
let resObj = getInitSearchRes(this.childPageWidget)
|
|
@@ -140,5 +155,6 @@ export default {
|
|
|
140
155
|
}
|
|
141
156
|
}
|
|
142
157
|
}
|
|
158
|
+
|
|
143
159
|
</script>
|
|
144
160
|
<style scoped></style>
|
|
@@ -43,7 +43,7 @@ export default {
|
|
|
43
43
|
getWidgetName,
|
|
44
44
|
getConfig() {
|
|
45
45
|
// 从路由参数中获取pageId
|
|
46
|
-
console.log("index-page-tm getConfig this.$route
|
|
46
|
+
console.log("index-page-tm getConfig this.$route:", this.$route)
|
|
47
47
|
this.pageId = this.$route.query.pageId || ''
|
|
48
48
|
if (!this.pageId) {
|
|
49
49
|
console.error("pageId为空,请检查菜单配置:", this.pageId)
|