Browse Source

Merge remote-tracking branch 'remotes/upstream/dev-1.1.0' into dev-1.1.0

pull/2/head
qiaozhanwei 5 years ago
parent
commit
f940c86997
  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