Bläddra i källkod

修复bug流程设置权限被覆盖问题,新增关联数据是否可输入功能

shenqilong 1 år sedan
förälder
incheckning
07452d98ea

+ 1 - 1
src/business/platform/bpmn/form/index.vue

@@ -307,7 +307,7 @@ export default {
             handler: function (val, oldVal) {
                 if (val) {
                     this.readonly = false
-                    console.log(this.readonly)
+                    // console.log(this.readonly)
                 }
                 this.buttons = this.buildButtons(this.responseData.buttons.slice(1, 4), this.attributes) || []
                 // }

+ 20 - 9
src/business/platform/form/formrender/dynamic-form/dynamic-form-table.vue

@@ -264,8 +264,8 @@ export default {
         },
         // 修改流程时间
         timeModification: {
-            type: Boolean
-
+            type: Boolean,
+            default: false
         },
         mainCode: String, // 主表名
         params: Object // 参数
@@ -492,7 +492,6 @@ export default {
         // 字段权限
         fieldRights: {
             handler (fieldRights) {
-                console.log(this.timeModification)
                 if (this.$utils.isNotEmpty(fieldRights) && this.$utils.isPlainObject(fieldRights)) {
                     this.tableRights = this.getRealRights(fieldRights['rights'] || FormOptions.t.PERMISSIONS.EDIT)
                     this.columnsRights = this.getColumnsRights(fieldRights['columns'])
@@ -508,17 +507,17 @@ export default {
         },
         timeModification: {
             handler (timeModification) {
-                console.log(this.timeModification, this.field, this.formData)
-
+                console.log(this.timeModification, 'abc')
                 if (timeModification) {
                     // 点击体系运行记录盒修改数据,子表返回状态可编辑
                     this.tableRights = 'e'
-                    this.columnsRights = 'e'
+                    this.columnsRights = this.getRealRightsTime()
+
                     this.buttonsRights = 'e'
                 }
             },
-            deep: true,
-            immediate: true
+            deep: true
+            // immediate: true
         }
     },
     beforeDestroy () {
@@ -527,7 +526,6 @@ export default {
         this.destoryTable()
     },
     created () {
-        console.log(this.timeModification, this.field, this.formData)
         window.onresize = () => {
             this.handleRefreshTable()
         }
@@ -595,12 +593,24 @@ export default {
          * 获取真实的权限
          */
         getRealRights (rights) {
+            // console.log(this.timeModification, '000')
             if (this.tableReadonly) {
                 return rights === FormOptions.t.PERMISSIONS.HIDE ? rights : FormOptions.t.PERMISSIONS.READ
             } else {
                 return rights
             }
         },
+        // 体系运行记录盒放开权限
+        getRealRightsTime () {
+            const columnsRights = {}
+            if (this.nameColumns && this.nameColumns.length > 0) {
+                this.nameColumns.forEach((column) => {
+                    columnsRights[column.name] = 'e'
+                })
+            }
+            // console.log(columnsRights)
+            return columnsRights
+        },
         getColumnsRights (rights = {}) {
             const columnsRights = {}
             if (this.nameColumns && this.nameColumns.length > 0) {
@@ -608,6 +618,7 @@ export default {
                     columnsRights[column.name] = this.getRealRights(rights[column.name] || FormUtils.getDefaultRigths(column))
                 })
             }
+            console.log(columnsRights, '000')
             return columnsRights
         },
         getButtonsRights (rights = {}) {