Переглянути джерело

修复平台子表单删除按钮bug,修改子表单查阅按钮图标

cfort 3 роки тому
батько
коміт
85effe863d

+ 1 - 1
src/business/platform/form/constants/tableButtonTypes.js

@@ -23,7 +23,7 @@ const buttonTypes = {
   'consult': {
     label: '查阅',
     style: 'primary',
-    icon: 'edit',
+    icon: 'eye',
     position: 'consult',
     scope: ['manage']
   },

+ 6 - 4
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -611,8 +611,9 @@ export default {
       })
       return bs
     },
-    handleActionEvent(button, index) {
-      index = index+ this.currentPage * 10 - 10
+    handleActionEvent(button, buttonIndex) {
+        // 起始下标
+      let index = this.currentPage * 10 - 10 + buttonIndex
       this.actionCode = button.key === 'custom' ? (button.code || button.key + index) : button.key
       this.actionPosition = button.position || 'toolbar'
       // 前置事件
@@ -634,7 +635,7 @@ export default {
             this.handleDialogMode(index)
             break
           case 'consult':
-            // 查按钮事件
+            // 查按钮事件
             this.handleDialogMode(index)
             break
           case 'remove':
@@ -694,8 +695,9 @@ export default {
       const selection = []
       if (position === 'toolbar' && this.mode !== 'block') {
         if (this.multipleSelection && this.multipleSelection.length > 0) {
+            let startIndex = this.currentPage * 10 - 10
           this.multipleSelection.forEach(row => {
-            selection.push(row.$index)
+            selection.push(row.$index + startIndex)
           })
         }
       } else {