DialogInputTop.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <div class="dialog-input-area-top-container">
  3. <BtnConfigDynamic @confirm="handleChujuanConfirm" @init_model="initModel" :user_input_form="user_input_form" />
  4. </div>
  5. </template>
  6. <script setup>
  7. import { ref, onMounted, onUnmounted } from 'vue';
  8. import BtnConfigDynamic from '../form-dynamic/BtnConfigDynamic.vue';
  9. /**
  10. * 此组件用以处理对话的附加参数
  11. * 父组件通过ref调用此组件expose的两个方法
  12. */
  13. const props = defineProps({
  14. disabled: Boolean,
  15. /**
  16. * 对应的表单数据
  17. *
  18. * */
  19. user_input_form: Array
  20. });
  21. const emit = defineEmits(['initModel']);
  22. const act_type = ref(1);
  23. // const upload_warning_text = `支持上传文件pdf、docx文档(最多${MAX_ACCEPT_FILE}个,每个大小不超过10MB)`;
  24. const radio_qingxi_text = '对上传的文档进行清洗,输出生成清洗后的文档';
  25. const radio_shengcheng_text = '对上传的(经过清洗的)文档生成报告,输出生成的报告文档';
  26. // const emit = defineEmits(['change']);
  27. const menuid7_config_datas = ref({});
  28. const handleRadioClick = (value) => {
  29. act_type.value = value / 1;
  30. };
  31. /**
  32. * 清空表单的内容
  33. */
  34. const clear = () => {};
  35. /**
  36. * 出卷的数据
  37. */
  38. const handleChujuanConfirm = (data) => {
  39. menuid7_config_datas.value = data;
  40. };
  41. /**
  42. * 获取所有的数据
  43. * 父组件应该使用 ref,调用此参数
  44. */
  45. const getOptions = () => {
  46. const obj = {};
  47. const params = menuid7_config_datas.value;
  48. for (const key in params) {
  49. obj[key] = params[key];
  50. }
  51. return obj;
  52. };
  53. const initModel = (val) => {
  54. emit('initModel', val);
  55. };
  56. defineExpose({
  57. /**
  58. * 清空表单里的内容
  59. */
  60. clear: clear,
  61. /**
  62. * 获取附件参数的键值对
  63. */
  64. getOptions: getOptions
  65. });
  66. </script>
  67. <style lang="css" scoped>
  68. .dialog-input-area-top-container {
  69. margin-bottom: 10px;
  70. }
  71. </style>