YangYuGang
2025-03-08 8cae1dcd8d2bde01880ac4b70bdda4e61df3c7ef
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!--
 * @Description: file content
 * @Author: Ben Lin
 * @version: 
 * @Date: 2024-06-18 15:09:48
 * @LastEditors: Ben Lin
 * @LastEditTime: 2024-08-13 20:38:51
-->
<template>
  <BasicModal
    v-bind="$attrs"
    @register="registerModal"
    :defaultFullscreen="true"
    :title="title"
    @ok="custFunction(isUpdate, submitFn, cType, setModalProps, closeModal, emit, slotName)"
    :width="width"
  >
    <!-- 这里嵌入router-view来展示路由页面 -->
    <Route_View :rotId="rotId" :rotType="rotType" :prodCode="prodCode" :custCode="custCode" />
  </BasicModal>
</template>
<script lang="ts" setup>
  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']);
  const isUpdate = ref(true);
  const cType = ref('');
  const title = ref('');
  const width = ref('');
  const rotId = ref('');
  const rotType = ref('');
  const prodCode = ref('');
  const custCode = ref('');
  const submitFn = ref('');
  const slotName = ref('');
 
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    setModalProps({ confirmLoading: false, cancelText: '关闭', showOkBtn: false });
    rotId.value = data?.rotId;
    rotType.value = data?.rotType;
    prodCode.value = data?.prodCode;
    custCode.value = data?.custCode;
    slotName.value = data?.slotName;
    submitFn.value = data?.submitFn; //'rvSubmit'
  });
 
  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>