Ben Lin
2024-07-03 46c3d28c5633baaddad0da441185310b9360a45b
src/views/components/RouteViewModal.vue
@@ -1,10 +1,18 @@
<!--
 * @Description: file content
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-18 15:09:48
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-06-30 13:07:46
-->
<template>
  <BasicModal
    v-bind="$attrs"
    @register="registerModal"
    :defaultFullscreen="true"
    :title="title"
    @ok="custFunction(isUpdate, 'rvSubmit', cType, setModalProps, closeModal, emit, slotName)"
    @ok="custFunction(isUpdate, submitFn, cType, setModalProps, closeModal, emit, slotName)"
    :width="width"
  >
    <!-- 这里嵌入router-view来展示路由页面 -->
@@ -12,9 +20,9 @@
  </BasicModal>
</template>
<script lang="ts" setup>
  import { ref, unref, onMounted } from 'vue';
  import { GetSelectSuccess, OpenSelectItem, custFunction, getFormSchema } from './data';
  import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
  import { ref, onMounted } from 'vue';
  import { custFunction } from './data';
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import Route_View from '/@/views/tigerprojects/mes/eng/route/index.vue';
  const emit = defineEmits(['success', 'register']);
@@ -23,12 +31,14 @@
  const title = ref('');
  const width = ref('');
  const rotId = ref('');
  const submitFn = ref('');
  const slotName = ref('');
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false });
    rotId.value = data?.rotId;
    slotName.value = data?.slotName;
    submitFn.value = data?.submitFn; //'rvSubmit'
  });
  onMounted(() => {});