소스 검색

资料填报,关闭窗口的bug

ZaiZai 2 년 전
부모
커밋
801cca59c3
2개의 변경된 파일10개의 추가작업 그리고 13개의 파일을 삭제
  1. 3 2
      src/global/components/hc-drag-modal/index.vue
  2. 7 11
      src/views/data-fill/collapse-form/index.vue

+ 3 - 2
src/global/components/hc-drag-modal/index.vue

@@ -261,7 +261,7 @@ const hide = () => {
     }
 }
 const _closeClick = () => {
-    emit('close', closeFunc)
+    emit('close')
 }
 //关闭弹窗
 const closeFunc = () => {
@@ -329,7 +329,8 @@ const destroyModal = () => {
 
 // 暴露出去
 defineExpose({
-    destroyModal
+    destroyModal,
+    closeFunc
 })
 </script>
 

+ 7 - 11
src/views/data-fill/collapse-form/index.vue

@@ -224,7 +224,7 @@
     <template v-for="(item,index) in DragModalTableForm">
         <HcDragModal :eid="item.pkeyId" :height="DragModalHeight" :isShow="item.isShow" :loading="item.loading"
                      :loadingText="item.loadingText" :title="item.title"
-                     isSortTop @close="TableFormClose($event, item, index)">
+                     isSortTop @close="TableFormClose(item, index)">
             <HcDragNode :more-menu="dragNodeMoreMenu" @menuTap="dragNodeMoreMenuTap($event, item)">
                 <HcTableForm :ref="(el) => setItemRefs(el, item)" :api="apis" :classify="item.classify"
                              :datas="changeFormDatas(item?.pkeyId, 'window')" :height="item.height"
@@ -765,19 +765,15 @@ const setInitDragModalTableForm = (item, index) => {
     }
 }
 
-const TableFormClose = async (closeFunc, item, index) => {
+//关闭窗口
+const TableFormClose = async ({pkeyId, index}, indexs) => {
+    const list = deepClone(DragModalTableForm.value)
     //取表单的数据
-    await setChangeFormDatas(item?.pkeyId, 'collapse')
-    console.log(item, index)
+    await setChangeFormDatas(pkeyId, 'collapse')
     //关闭窗口
-    const list = DragModalTableForm.value
-    console.log(list)
-    list.splice(index, 1)
-    listDatas.value[item.index].isWindow = false
+    list.splice(indexs, 1)
     DragModalTableForm.value = list
-    console.log(list)
-    //关闭窗口
-    //closeFunc()
+    listDatas.value[index].isWindow = false
 }
 
 const dragNodeMoreMenu = [