Просмотр исходного кода

fix:修复单选对话框重复选择后无法显示数据的问题

liujiayin 2 лет назад
Родитель
Сommit
1c13f7511d
1 измененных файлов с 9 добавлено и 7 удалено
  1. 9 7
      src/business/platform/data/templaterender/templates/list.vue

+ 9 - 7
src/business/platform/data/templaterender/templates/list.vue

@@ -655,7 +655,7 @@ export default {
             if (this.multiple) {
                 selectionAll = [].concat(this.selectionAll)
             } else {
-                selectionAll = this.selectionAll
+                selectionAll.push(this.selectionAll)
             }
             // 获取当前页选中的id
             const selectIds = []
@@ -706,12 +706,12 @@ export default {
                     }
                 }
             })
-            // if (this.multiple) {
-            //     this.selectionAll = selectionAll
-            // } else {
-            //     this.selectionAll = selectionAll[0]
-            // }
-            this.selectionAll = selectionAll
+            if (this.multiple) {
+                this.selectionAll = selectionAll
+            } else {
+                this.selectionAll = selectionAll[0]
+            }
+            // this.selectionAll = selectionAll
         },
         setSelectRow () {
             setTimeout(() => {
@@ -889,6 +889,8 @@ export default {
             this.hadDoSearch = true
             this.loadData()
             this.addDataCont = {}
+            this.selectionAll = []
+            this.selection = []
         },
         /* 流程页面关闭,刷新当前页面*/
         loadFlowFData (v, temp) {