Ben Lin
2024-06-07 aa0bc81d06736cc1a1bd210dde61f57736585d43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<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>