From 04aac2eda9b5d9473eb96d12b32cb76fb45135c6 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期日, 21 七月 2024 19:52:31 +0800
Subject: [PATCH] 工单更新

---
 src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue |   72 +++++++++++++++++++++---------------
 1 files changed, 42 insertions(+), 30 deletions(-)

diff --git a/src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue b/src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue
index 0b439b7..dfb1e13 100644
--- a/src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue
+++ b/src/views/tigerprojects/mes/eng/route/components/PropsPanel.vue
@@ -4,22 +4,26 @@
  * @version: 
  * @Date: 2024-04-28 15:15:22
  * @LastEditors: your name
- * @LastEditTime: 2024-06-13 08:50:47
+ * @LastEditTime: 2024-06-18 01:17:30
 -->
 <!--
  * @Description: 鍙充晶灞炴�ч厤缃潰鏉�
 -->
 <template>
   <div>
-    <Tabs v-model:activeKey="routeConfig.activeKey" :tabBarStyle="{ margin: 0 }" @tabClick="tabclkCallback">
+    <Tabs
+      v-model:activeKey="routeConfig.activeKey"
+      :tabBarStyle="{ margin: 0 }"
+      @tabClick="tabclkCallback"
+    >
       <TabPane :key="1" tab="宸ヨ壓璺嚎">
         <FormProps />
       </TabPane>
       <TabPane :key="2" :tab="title">
-        <FormItemProps v-if="IsOper" />
-        <ActionItemProps v-if="!IsOper"  />
+        <FormItemProps v-if="IsOper" @changeNodeName="changeNodeName" />
+        <ActionItemProps v-if="!IsOper" @changeName="changeName" />
       </TabPane>
-      <TabPane :key="3" :tab="posttitle" >
+      <TabPane :key="3" :tab="posttitle">
         <PostProps ref="postProps" v-if="IsOper" />
       </TabPane>
       <!-- <TabPane :key="4" tab="缁勪欢">
@@ -35,20 +39,21 @@
   import ActionItemProps from './ActionItemProps.vue';
   import PostProps from './PostProps.vue';
   import { useRouteDesignState } from '../hooks/useRouteDesignState';
-  import { TabPane, Tabs } from 'ant-design-vue';
-import { ref, watch } from 'vue';
+  import { TabPane, Tabs, Form, FormItem, Select, Input, InputNumber } from 'ant-design-vue';
+  import { ref, watch } from 'vue';
 
   type ChangeTabKey = 1 | 2;
   export interface IPropsPanel {
     changeTab: (key: ChangeTabKey) => void;
   }
+  const emit = defineEmits(['changeName', 'changeNodeName']);
   const { routeConfig } = useRouteDesignState();
   const props = defineProps({
     IsOperation: Boolean,
     title: String,
     posttitle: String,
-    colSlots: [],
-    crudColSlots: [],
+    colSlots: Array,
+    crudColSlots: Array,
     entityName: String,
   });
   const postProps = ref(null);
@@ -56,31 +61,40 @@
   const IsReload = ref(false);
   const title = ref('');
   const posttitle = ref('');
-  const colSlots = ref<any>([]);
-  const crudColSlots = ref<any>([]);
   const entityName = ref('MES_POSITION');
   watch(
-    [() => props.IsOperation, () => props.title, () => props.colSlots, () => props.crudColSlots, () => props.entityName, () => props.posttitle],
-        (v) => {
-          IsOper.value = v[0];
-          title.value = v[1] as string;
-          colSlots.value = v[2];
-          crudColSlots.value = v[3];
-          entityName.value = v[4] as string;
-          posttitle.value = v[5] as string;
-        },
-        { deep: true },
-      );
-  
+    [
+      () => props.IsOperation,
+      () => props.title,
+      () => props.entityName,
+      () => props.posttitle,
+    ],
+    (v) => {
+      IsOper.value = v[0];
+      title.value = v[1] as string;
+      entityName.value = v[2] as string;
+      posttitle.value = v[3] as string;
+    },
+    { deep: true },
+  );
+
   /**
    * @description: 鐐瑰嚮tab鍥炶皟鏂规硶
    * @param {*} val
    * @return {*}
-   */  
-  function tabclkCallback(val){
-    if(val == '3'){
+   */
+  function tabclkCallback(val) {
+    if (val == '3') {
       postProps.value?.reload();
     }
+  }
+
+  function changeName(e) {
+    emit('changeName', e);
+  }
+
+  function changeNodeName(e) {
+    emit('changeNodeName', e);
   }
 </script>
 
@@ -91,12 +105,10 @@
     box-sizing: border-box;
 
     form {
-      position: absolute;
       width: 100%;
-      height: calc(100% - 50px);
+      height: 85vh;
       margin-right: 10px;
-      overflow-x: hidden;
-      overflow-y: auto;
+      overflow: hidden auto;
     }
 
     .hint-box {

--
Gitblit v1.9.3