Ben Lin
2024-06-21 2abb91c893f2eed3761bd09aabe12400460d2863
src/views/tigerprojects/system/lowcode/composition/index.vue
@@ -1,5 +1,13 @@
<template>
  <PageWrapper dense contentFullHeight fixedHeight contentClass="flex">
  <PageWrapper
    :dense="dense"
    contentFullHeight
    fixedHeight
    contentClass="flex"
    :title="pageTitle"
    :content="pageContent"
    @back="goBack"
  >
    <GeneralTree
      class="w-1/4 xl:w-1/5"
      @select="handleSelect"
@@ -10,7 +18,9 @@
    /><!--
      add
      @handle-add="handleAdd" -->
    <div class="w-3/4 xl:w-4/5"></div>
    <div class="w-3/4 xl:w-4/5 p-5">
      <RouteAction v-if="entityName == 'ProdRouteBinding'" />
    </div>
    <!-- <BasicTable class="w-3/4 xl:w-4/5" @register="registerTable">
      <template #toolbar>
        <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> 新增 </a-button>
@@ -21,7 +31,7 @@
        </template>
      </template>
    </BasicTable> -->
    <normalDrawer @register="registerDrawer" @success="handleSuccess" />
    <!-- <normalDrawer @register="registerDrawer" @success="handleSuccess" /> -->
    <CustModal
      @register="registerCust"
      @success="custSuccess"
@@ -56,6 +66,7 @@
  import { useModal } from '@/components/Modal';
  import normalDrawer from '../normalDrawer.vue';
  import GeneralModal from '/@/views/components/GeneralModal.vue';
  import RouteAction from './RouteAction.vue';
  import CustModal from '/@/views/components/CustModal.vue';
  import {
    GetActionsData,
@@ -63,6 +74,7 @@
    OpenCustModal,
    fetchTreeData,
    getFormSchema,
    getHomeUrl,
    getOthersValues,
  } from '../data';
  import { onMounted, reactive, ref } from 'vue';
@@ -73,12 +85,15 @@
  import { createIconByType } from '../data';
  import { RouteToProd } from '/@/api/tigerapi/mes/router';
import { useTabs } from '/@/hooks/web/useTabs';
  import { isNullOrUnDef } from '/@/utils/is';
  import { useGo } from '/@/hooks/web/usePage';
  defineOptions({ name: 'DeptManagement' });
  const go = useGo();
  const route = useRoute();
  const { setTitle } = useTabs();
  const objParams = ref(JSON.parse(decodeURI(route.params?.id as string)));
  const objParams = ref(JSON.parse(decodeURI(route.params?.id as string))); //ref(JSON.parse(history.state.obj))
  const entityName = ref(objParams.value.Name);
  const formSchemas = ref({}); //弹出框或高级页面多表单结构
  const useModalData = ref({}); //表单中插槽渲染按钮打开模态框useModal方法
@@ -94,6 +109,9 @@
  const treeData = ref<TreeItem[]>([]);
  const title = ref('');
  const fieldNames = ref({});
  const dense = isNullOrUnDef(objParams.value.dense) ? ref(false) : ref(objParams.value.dense);
  const pageTitle = ref(objParams.value.pageTitle);
  const pageContent = ref(objParams.value.pageContent);
  const others = ref(getOthersValues(entityName.value, objParams.value.CODE, objParams.value.ID));
  const [registerCust, { openModal: openCustomModal, closeModal }] = useModal();
  const [registerItemAdd, { openModal: openItemModal }] = useModal();
@@ -134,6 +152,14 @@
    title.value = data.title;
    treeData.value = data.treeData;
    fieldNames.value = data.fieldNames;
  }
  /**
   * @description: 页面左侧点击返回链接时的操作
   * @return {*}
   */
  function goBack() {
    go(getHomeUrl(entityName.value));
  }
  // function handleAdd(){
@@ -213,9 +239,9 @@
    //     others: others.value,
    //   });
    // });
    RouteToProd({rotId: 'e4712192f75b465585107fdcd13d8003', prodCode: 'K5019AA013517'}).then(() => {
    });
    RouteToProd({ rotId: 'e4712192f75b465585107fdcd13d8003', prodCode: 'K5019AA013517' }).then(
      () => {},
    );
  }
  // function handleEdit(record: Recordable) {
@@ -229,14 +255,14 @@
  //   console.log(record);
  // }
  function handleSelect(deptId = '') {
  function handleSelect(deptId = '', info) {
    searchInfo.deptId = deptId;
    reload();
    // reload();
  }
  function handleSuccess() {
    reload();
  }
  // function handleSuccess() {
  //   reload();
  // }
  /**
   * @description: 弹出框确定返回
@@ -244,7 +270,7 @@
   * @return {*}
   */
  function custSuccess(d) {
    reload();
    // reload();
  }
  /**