Browse Source

update 查阅按钮

linweizeng 3 years ago
parent
commit
3561d3e81f

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

@@ -212,9 +212,11 @@ export default {
             return this.filterButtons('toolbar')
         },
         manageButtons() {
+
             return this.filterButtons('manage')
         },
         manageButtonWidth() {
+
             return this.manageButtons.length > 2 || this.manageButtons.length === 1 ? 70 : 150
         },
         mode() {
@@ -475,12 +477,15 @@ export default {
         filterDetailButtons(position) {
             const bs = []
             this.buttons.forEach((button) => {
+                console.log(button, button.enabledDetail, this.$utils.toBoolean(button.enabledDetail))
                 if (
                     hasPermission(button.key, position) && // 有位置权限
                     (!button.position || button.position === 'all' || button.position === position) && // 有位置权限
                     (this.$utils.isEmpty(this.buttonsRights[button.key]) || this.buttonsRights[button.key] !== FormOptions.t.PERMISSIONS.HIDE) && // 有按钮权限
-                    this.$utils.toBoolean(button.enabledDetail)
+                    button.key === 'consult'
                 ) {
+                    // 原按钮权限限制 改为开放查阅按钮 modified by 林总
+                    // this.$utils.toBoolean(button.enabledDetail)
                     const b = JSON.parse(JSON.stringify(button))
                     b.position = position
                     bs.push(b)