selectPeople.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <template>
  2. <a-modal
  3. v-model:visible="modeVisible"
  4. class="custom-class"
  5. title="选择人员"
  6. placement="right"
  7. width="1000px"
  8. :closable="false"
  9. @close="visible=false"
  10. @ok="submit">
  11. <normalTable rowKey="optiontypemxid" ref="list" size="small" :param="param" :columns="utils.TBLayout('staffTable')" @onSelect="onSelect">
  12. <template #tb_cell="{data}">
  13. {{ data.record[data.column.dataIndex] }}
  14. </template>
  15. </normalTable>
  16. </a-modal>
  17. <slot name="input"></slot>
  18. </template>
  19. <script setup>
  20. import {ref, defineProps, defineEmits} from 'vue'
  21. import utils from '@/utils/utils'
  22. import normalTable from '@/template/normalTable/index.vue'
  23. let modeVisible = ref(false)
  24. let param = ref({
  25. "id": 20221031141102,
  26. "content": {
  27. "pageSize":20,
  28. "pageNumber":1,
  29. "where": {
  30. "condition": "",
  31. }
  32. }
  33. })
  34. let emit = defineEmits(['selectPeople'])
  35. let result = ref('')
  36. let submit = () => {
  37. emit('selectPeople',result.value)
  38. modeVisible.value = false
  39. }
  40. let onSelect = (data) => {
  41. console.log(data);
  42. result.value = data
  43. }
  44. defineExpose({
  45. modeVisible,
  46. })
  47. </script>
  48. <style scoped>
  49. </style>