Ben Lin
2024-08-13 0fdfd2fe63697590d755f50ff8e7ae9bdf7f1f7d
src/views/components/RouteViewModal.vue
@@ -1,20 +1,28 @@
<!--
 * @Description: file content
 * @Author: Ben Lin
 * @version:
 * @Date: 2024-06-18 15:09:48
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-04 16:34:13
-->
<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来展示路由页面 -->
    <Route_View :rotId="rotId" />
    <Route_View :rotId="rotId" :rotType="rotType" />
  </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,17 @@
  const title = ref('');
  const width = ref('');
  const rotId = ref('');
  const rotType = ref('');
  const submitFn = ref('');
  const slotName = ref('');
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false });
    setModalProps({ confirmLoading: false, cancelText: '关闭', showOkBtn: false });
    rotId.value = data?.rotId;
    rotType.value = data?.rotType;
    slotName.value = data?.slotName;
    submitFn.value = data?.submitFn; //'rvSubmit'
  });
  onMounted(() => {});