mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-21 02:59:07 +00:00
Merge pull request #4173 from jumpserver/pr@dev@fix_cloud_origin
fixed: cloud origin bug. TAPD: 1043263
This commit is contained in:
@@ -122,9 +122,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activated() {
|
|
||||||
this.$refs.accountTable.reloadTable()
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
valid(status) {
|
valid(status) {
|
||||||
if (status !== 200) {
|
if (status !== 200) {
|
||||||
|
@@ -172,11 +172,12 @@ export default {
|
|||||||
btn.loading = true
|
btn.loading = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$refs.form.$refs.form.dataForm.submitForm('form', false)
|
this.$refs.form.$refs.form.dataForm.submitForm('form', false)
|
||||||
|
|
||||||
if (this.origin === 'update') {
|
if (this.origin === 'update') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$emit('refresh')
|
this.$emit('submitSuccess')
|
||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-checkbox v-model="checkAll" @change="handleCheckedAllChange">
|
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckedAllChange">
|
||||||
{{ $t('All') }}
|
{{ $t('All') }}
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -75,7 +75,7 @@ export default {
|
|||||||
allRegions: [],
|
allRegions: [],
|
||||||
checkAll: false,
|
checkAll: false,
|
||||||
regionVisible: false,
|
regionVisible: false,
|
||||||
isIndeterminate: false
|
isIndeterminate: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -126,10 +126,13 @@ export default {
|
|||||||
handleCheckedAllChange(val) {
|
handleCheckedAllChange(val) {
|
||||||
this.checkedRegion = val ? this.allRegions.map(region => region.id) : []
|
this.checkedRegion = val ? this.allRegions.map(region => region.id) : []
|
||||||
this.isIndeterminate = false
|
this.isIndeterminate = false
|
||||||
|
this.checkAll = !!val
|
||||||
|
this.$emit('input', [])
|
||||||
|
this.refreshContent()
|
||||||
},
|
},
|
||||||
handleCheckedRegionChange(value) {
|
handleCheckedRegionChange(value) {
|
||||||
const checkedCount = value.length
|
const checkedCount = value.length
|
||||||
this.checkAll = checkedCount === this.allRegions.length
|
this.checkAll = checkedCount === 0 || checkedCount === this.allRegions.length
|
||||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allRegions.length
|
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allRegions.length
|
||||||
|
|
||||||
const region = this.allRegions
|
const region = this.allRegions
|
||||||
@@ -145,7 +148,9 @@ export default {
|
|||||||
updateCheckedStatus() {
|
updateCheckedStatus() {
|
||||||
const checkedCount = this.checkedRegion.length
|
const checkedCount = this.checkedRegion.length
|
||||||
this.checkAll = checkedCount === this.allRegions.length
|
this.checkAll = checkedCount === this.allRegions.length
|
||||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allRegions.length
|
if (checkedCount === 0 || checkedCount === this.allRegions.length) {
|
||||||
|
this.handleCheckedAllChange(this.allRegions)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user