lambo-design-bi 0.0.111 → 0.0.131
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.
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
} else {
|
|
55
55
|
if (res.data.data) {
|
|
56
56
|
let pageWidgetTree = deepCopy(res.data.data)
|
|
57
|
-
|
|
57
|
+
this.pageTitle = pageWidgetTree.options.title || ''
|
|
58
58
|
console.log("获取页面配置 1:", pageWidgetTree)
|
|
59
59
|
this.setRouteConfig2Search(pageWidgetTree)
|
|
60
60
|
console.log("获取页面配置 2:", pageWidgetTree)
|
|
@@ -114,9 +114,9 @@ export default {
|
|
|
114
114
|
if (item.options && Object.prototype.hasOwnProperty.call(item.options, "qKey") && item.options['qKey']) {
|
|
115
115
|
let searchType = item.options['searchType']
|
|
116
116
|
let qKey = item.options['qKey']
|
|
117
|
-
if (searchType === SEARCH_DICT.INPUT.id) {
|
|
117
|
+
if (searchType === SEARCH_DICT.INPUT.id) {
|
|
118
118
|
item['val'] = routeConfig[qKey]
|
|
119
|
-
} else if (searchType === SEARCH_DICT.SINGLE_SELECT.id) {
|
|
119
|
+
} else if (searchType === SEARCH_DICT.SINGLE_SELECT.id) {
|
|
120
120
|
let val = routeConfig[qKey]
|
|
121
121
|
let valName = ''
|
|
122
122
|
let selDataList = item.options['dataList']
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
item['valName'] = valName
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
} else if (searchType === SEARCH_DICT.MUlTI_SELECT.id) {
|
|
138
|
+
} else if (searchType === SEARCH_DICT.MUlTI_SELECT.id) {
|
|
139
139
|
let val = routeConfig[qKey]
|
|
140
140
|
let valNameArr = []
|
|
141
141
|
let selDataList = item.options['dataList']
|
|
@@ -154,13 +154,13 @@ export default {
|
|
|
154
154
|
item['valName'] = valNameArr.join()
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
} else if (searchType === SEARCH_DICT.SINGLE_DATE.id) {
|
|
157
|
+
} else if (searchType === SEARCH_DICT.SINGLE_DATE.id) {
|
|
158
158
|
let val = routeConfig[qKey]
|
|
159
159
|
if (val && val.indexOf('-') > 0) {
|
|
160
160
|
val = moment(val).format("YYYYMMDD")
|
|
161
161
|
}
|
|
162
162
|
item['val'] = val
|
|
163
|
-
} else if (searchType === SEARCH_DICT.MUlTI_DATE.id) {
|
|
163
|
+
} else if (searchType === SEARCH_DICT.MUlTI_DATE.id) {
|
|
164
164
|
console.log("detail -- getPageConfig -- routeConfig:", routeConfig)
|
|
165
165
|
let startDate = routeConfig[qKey + '_start']
|
|
166
166
|
console.log("detail -- getPageConfig -- startDate:", startDate)
|
|
@@ -187,6 +187,16 @@ export default {
|
|
|
187
187
|
},
|
|
188
188
|
mounted() {
|
|
189
189
|
|
|
190
|
+
},
|
|
191
|
+
watch: {
|
|
192
|
+
// 监听 $route 对象的变化
|
|
193
|
+
'$route'(to, from) {
|
|
194
|
+
// 只有 query 或 params 变化时执行逻辑(避免 path 相同但参数变化时无响应)
|
|
195
|
+
if (to.path === from.path && (to.query !== from.query || to.params !== from.params)) {
|
|
196
|
+
console.log("------------'$route'(to, from)---------------------------")
|
|
197
|
+
this.getConfig()
|
|
198
|
+
}
|
|
199
|
+
}
|
|
190
200
|
}
|
|
191
201
|
}
|
|
192
202
|
</script>
|