Эх сурвалжийг харах

fix: 自定义审批意见问题修复

liuc 3 сар өмнө
parent
commit
99b0de1a5c

+ 9 - 2
src/views/flow/stFormDesign/packages/StFormDesign/module/formNode.vue

@@ -9,7 +9,7 @@
   >
     <div class="form-item-box"
     >
-      <StFormItem  :formConfig="config" :formData='{}' :record="record" :childTableFieldRecord='childTableFieldRecord'
+      <StFormItem :formConfig="config" :formData='{}' :record="record" :childTableFieldRecord='childTableFieldRecord'
                   :isDesign="true"/>
       <div class="cover"
            v-show="!( !record.options||!record.options.hidden||record.options.hidden == false )">
@@ -21,7 +21,7 @@
         class="show-key-event"
     >
       <a-tooltip>
-        <template #title>存在Change事件</template>
+        <template #title>{{ getTooltipTitle() }}</template>
         <CopyrightCircleOutlined/>
       </a-tooltip>
     </div>
@@ -142,6 +142,13 @@ export default {
     }
   },
   methods: {
+    getTooltipTitle() {
+      if (this.record?.model?.indexOf('button_') >= 0) {
+        return '存在点击事件'
+      }else{
+        return '存在值改变事件'
+      }
+    },
     getEvent() {
       return JSON.parse(sessionStorage.getItem('_scriptKeys_')).includes(this.record.key)
     },

+ 6 - 2
src/views/flow/stFormDesign/packages/StFormDesign/module/layoutItem.vue

@@ -40,7 +40,6 @@
               @change="dragChange"
           >
             <template #item="{ element, index }">
-
               <formNode
                   :key="element.key"
                   :style="{ width: element.options.childWidth || '300px' }"
@@ -72,7 +71,7 @@
             class="show-key-event"
         >
           <a-tooltip>
-            <template #title>存在Change事件</template>
+            <template #title>存在子表的值改变事件</template>
             <CopyrightCircleOutlined/>
           </a-tooltip>
         </div>
@@ -537,20 +536,25 @@ export default {
   display: grid;
   grid-template-columns: repeat(3, 1fr); /* 每行3列 */
   gap: 5px; /* 设置子元素之间的间距 */
+
 }
 
 .batch-draggable-box > * {
   grid-column: span 1; /* 默认占用1列 */
+  min-width: 100%; /* 设置最小宽度为100% */
+  border: 1px dotted #ccc;
 }
 
 /* 如果某个子元素需要占用2列 */
 .batch-draggable-box > .span-2 {
   grid-column: span 2; /* 占用2列 */
+  border: 1px dotted #ccc;
 }
 
 /* 如果某个子元素需要占用3列 */
 .batch-draggable-box > .span-3 {
   grid-column: span 3; /* 占用3列 */
+  border: 1px dotted #ccc;
 }
 .show-key-event {
   position: absolute;

+ 0 - 3
src/views/flow/stFormWork/components/comment/index.vue

@@ -61,14 +61,11 @@ export default {
     }
   },
   mounted() {
-    if (this.tag=='AUDIT'){
       getCommonComment().then((res) => {
         for (let i = 0; i < res.data.length; i++) {
           this.options.push({value: res.data[i].id, label: res.data[i].comment})
         }
       })
-    }
-
   }
 }
 </script>