<template>
|
<BasicModal
|
v-bind="$attrs"
|
@register="registerModal"
|
:defaultFullscreen="true"
|
:title="title"
|
@ok="custFunction(isUpdate, 'rvSubmit', cType, setModalProps, closeModal, emit, slotName)"
|
:width="width"
|
>
|
<!-- 这里嵌入router-view来展示路由页面 -->
|
<Route_View :rotId="rotId" />
|
</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 Route_View from '/@/views/tigerprojects/mes/eng/route/index.vue';
|
|
const emit = defineEmits(['success', 'register']);
|
const isUpdate = ref(true);
|
const cType = ref('');
|
const title = ref('');
|
const width = ref('');
|
const rotId = ref('');
|
const slotName = ref('');
|
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
setModalProps({ confirmLoading: false });
|
rotId.value = data?.rotId;
|
slotName.value = data?.slotName;
|
});
|
|
onMounted(() => {});
|
// watch(
|
// () => props,
|
// (newVal, oldVal) => {
|
// if (newVal !== oldVal) formSchema.value = getFormschema(props.ctype);
|
// },
|
// { deep: true },
|
// );
|
|
/* 弹出选择框选择成功后事件 */
|
function handleItemSuccess(d, u) {
|
// setFieldsValue(GetSelectSuccess(d, u, cType.value));
|
}
|
|
/* 弹出选择框 */
|
function handleSelectItem(item) {
|
// OpenSelectItem(openCustModal, cType.value, item);
|
}
|
</script>
|