linweizeng пре 2 година
родитељ
комит
1904f4a593

+ 2 - 0
src/business/platform/form/formrender/dynamic-form/dynamic-form-field.vue

@@ -37,6 +37,7 @@
                     unselectable="on"
                     :style="{ width: width }"
                     clearable
+                    v-on="$listeners"
                 />
 
                 <!-- <el-button
@@ -962,6 +963,7 @@ export default {
         },
         dataModel: {
             handler (val) {
+                this.$emit('change-data', this.field.name,val)
                 this.$emit('update:value', val)
             },
             deep: true

+ 10 - 11
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -413,19 +413,19 @@ export default {
                 }
                 page = this.currentPage * 10 - 10
             }
-            if (this.dataModel.length < this.oldList.length  ) {
+            if (this.dataModel.length < this.oldList.length) {
                 const valBai = size % 10
                 const valChu = parseInt(size / 10)
-                if(this.editFromType =='remove' && this.multipleSelection.length !==0){
+                if (this.editFromType == 'remove' && this.multipleSelection.length !== 0) {
                     // 指定页删除数满10条:
-                        // 删完之后,如果下一页还有数据,则页码继续不变,如果下一页没有数据那么页码减1,直至页码=0
-                        // 除去本页剩余个数 
-                        let yuShu = this.oldList.length - this.currentPage*10
-                        if(yuShu < this.multipleSelection.length &&  yuShu<0 ){
-                            this.currentPage  =this.currentPage -1
-                        }  
-                }else{
-                      if (valBai === 0) {
+                    // 删完之后,如果下一页还有数据,则页码继续不变,如果下一页没有数据那么页码减1,直至页码=0
+                    // 除去本页剩余个数
+                    const yuShu = this.oldList.length - this.currentPage * 10
+                    if (yuShu < this.multipleSelection.length && yuShu < 0) {
+                        this.currentPage = this.currentPage - 1
+                    }
+                } else {
+                    if (valBai === 0) {
                         this.currentPage = valChu
                     } else {
                         this.currentPage = valChu + 1
@@ -1120,4 +1120,3 @@ export default {
 }
 </style>
 
-  </style>