mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-05 05:38:30 +08:00
add tenant id..
This commit is contained in:
parent
50e36b5ece
commit
671c296da6
@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<x-select
|
||||
:disabled="isDetails"
|
||||
@on-change="_onChange"
|
||||
v-model="value"
|
||||
style="width: 180px">
|
||||
<x-option
|
||||
v-for="item in itemList"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:label="item.tenantName">
|
||||
</x-option>
|
||||
</x-select>
|
||||
</template>
|
||||
<script>
|
||||
import disabledState from '@/module/mixin/disabledState'
|
||||
export default {
|
||||
name: 'form-tenant',
|
||||
data () {
|
||||
return {
|
||||
itemList: []
|
||||
}
|
||||
},
|
||||
mixins: [disabledState],
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
default: -1
|
||||
}
|
||||
},
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'tenantSelectEvent'
|
||||
},
|
||||
methods: {
|
||||
_onChange (o) {
|
||||
this.value = o.value
|
||||
this.$emit('tenantSelectEvent', o.value)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
created () {
|
||||
let stateTenantAllList = this.store.state.security.tenantAllList || []
|
||||
if (stateTenantAllList.length) {
|
||||
this.itemList = stateTenantAllList
|
||||
} else {
|
||||
this.store.dispatch('actions/getTenantList').then(res => {
|
||||
this.$nextTick(() => {
|
||||
this.itemList = res
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user