登录页面增加组织选择
This commit is contained in:
parent
b2acf8dc27
commit
2dab07eb44
42
src/views/login/orgSelect.vue
Normal file
42
src/views/login/orgSelect.vue
Normal file
@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<el-dialog center :visible.sync="show" :close-on-click-modal="false" :show-close="false" title="请选择要登录的组织">
|
||||
<div class="formWrapper">
|
||||
<el-select v-model="selected" placeholder="请选择">
|
||||
<el-option v-for="option in orgList" :key="option.orgId" :label="option.name" :value="option.orgId" />
|
||||
</el-select>
|
||||
</div>
|
||||
<el-button slot="footer" primary size="small" @click="confirmSelect">确认</el-button>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'OrgSelect',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
orgList: [],
|
||||
selected: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirmSelect() {
|
||||
this.$emit('select', this.selected)
|
||||
},
|
||||
doShow(orgList) {
|
||||
this.orgList = orgList
|
||||
this.show = true
|
||||
},
|
||||
doClose() {
|
||||
this.show = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.formWrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user