admin_user_batch.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <div>
  3. <el-select v-model="select_val" multiple @change="handleChange" placeholder="请选择">
  4. <el-option
  5. v-for="item in options"
  6. :key="item.uid"
  7. :label="item.real_name"
  8. :value="item.uid">
  9. </el-option>
  10. </el-select>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. select_val: [],
  18. options: []
  19. }
  20. },
  21. props: {
  22. change:{
  23. type: Function,
  24. },
  25. value:{
  26. }
  27. },
  28. mounted() {
  29. this.select_val = this.value;
  30. this.getCateGory()
  31. },
  32. methods: {
  33. handleChange(value) {
  34. this.$emit('input',value);
  35. if(typeof(this.change)=="function")
  36. {
  37. this.change(value);
  38. }
  39. },
  40. async getCateGory() {
  41. const res = await this.$post('/uapi/pub/list/admin/admin_user/list')
  42. this.options = res.data
  43. }
  44. }
  45. }
  46. </script>
  47. <style scoped>
  48. .screenfull-svg {
  49. display: inline-block;
  50. cursor: pointer;
  51. fill: #5a5e66;;
  52. width: 20px;
  53. height: 20px;
  54. vertical-align: 10px;
  55. }
  56. </style>