mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-20 18:49:19 +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: {
|
||||
valid(status) {
|
||||
if (status !== 200) {
|
||||
|
@@ -172,11 +172,12 @@ export default {
|
||||
btn.loading = true
|
||||
}
|
||||
})
|
||||
|
||||
this.$refs.form.$refs.form.dataForm.submitForm('form', false)
|
||||
|
||||
if (this.origin === 'update') {
|
||||
setTimeout(() => {
|
||||
this.$emit('refresh')
|
||||
this.$emit('submitSuccess')
|
||||
this.$emit('update:visible', false)
|
||||
}, 500)
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-checkbox v-model="checkAll" @change="handleCheckedAllChange">
|
||||
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckedAllChange">
|
||||
{{ $t('All') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
allRegions: [],
|
||||
checkAll: false,
|
||||
regionVisible: false,
|
||||
isIndeterminate: false
|
||||
isIndeterminate: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -126,10 +126,13 @@ export default {
|
||||
handleCheckedAllChange(val) {
|
||||
this.checkedRegion = val ? this.allRegions.map(region => region.id) : []
|
||||
this.isIndeterminate = false
|
||||
this.checkAll = !!val
|
||||
this.$emit('input', [])
|
||||
this.refreshContent()
|
||||
},
|
||||
handleCheckedRegionChange(value) {
|
||||
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
|
||||
|
||||
const region = this.allRegions
|
||||
@@ -145,7 +148,9 @@ export default {
|
||||
updateCheckedStatus() {
|
||||
const checkedCount = this.checkedRegion.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