fix:地址栏参数优化

This commit is contained in:
zyh
2022-11-29 14:23:42 +08:00
parent c0791905c9
commit c99ca6cb1c
3 changed files with 32 additions and 23 deletions

View File

@@ -602,7 +602,7 @@ export default {
for (let index = 0; index < arr.length; index++) { // 遍历找出所有需要 repeat的group 按照 name进行多次的分组
const item = arr[index]
const repeatVariable = this.$loadsh.get(item.param.repeat, 'variable')
if (item.type === 'group' && repeatVariable) {
if (item.type === 'group' && repeatVariable && this.$loadsh.get(this.showHidden[item.id], 'visibility') !== 'hidden') {
const itemPrev = arr[index - 1]
const repeatPrevVariable = this.$loadsh.get(itemPrev.param.repeat, 'variable')
if (itemPrev && itemPrev.type === 'group' && repeatPrevVariable === repeatVariable) {

View File

@@ -33,7 +33,9 @@ export default {
changeDetailType (flag) {
setTimeout(() => {
const query = { ...this.$route.query, detailType: flag }
query.bottomBox = this.detailType !== 'view'
if (this.detailType == 'view') {
delete query.bottomBox
}
this.$router.replace({ query: query }).catch(err => {})
}, 100)
if (this.detailType === flag) {

View File

@@ -62,6 +62,7 @@ export default {
params.targetTab = this.$route.query.targetTab
}
if (!params.targetTab) delete params.targetTab
if (!params.bottomBox) delete params.bottomBox
if (this.detailType === 'list' && this.$refs[detailType]) {
const obj = {
id: this.$refs[detailType].bottomBox.object.id,
@@ -119,6 +120,9 @@ export default {
} else if (from === 'nzDatalist' && this.bottomBox) {
params.bottomBox = this.bottomBox.showSubList
params.targetTab = this.bottomBox.targetTab
if (!params.targetTab) delete params.targetTab
if (!params.bottomBox) delete params.bottomBox
if (this.bottomBox.showSubList) { // 关闭bottomBox打开还是关闭
const obj = {
id: this.bottomBox.object.id,
name: this.bottomBox.object.name,
@@ -143,6 +147,9 @@ export default {
if (JSON.stringify(obj) != '{}') {
params.selectObj = JSON.stringify(obj)
}
} else {
delete params.selectObj
}
this.$router.replace({ path: path, query: params }).catch(err => {})
} else if (from === 'nzDetailList' && this.detailViewRightObj) {
params.targetTab = this.$route.query.targetTab