Browse Source

Merge pull request #500 from lenboo/dev-1.1.0

add tenant id..
pull/2/head
bao liang 6 years ago committed by GitHub
parent
commit
a4fec4e890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 56
      escheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue

56
escheduler-ui/src/js/conf/home/pages/dag/_source/udp/_source/selectTenant.vue

@ -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…
Cancel
Save