Преглед изворни кода

Revert "修复首页待办,已办,办结列表点击左侧树不响应问题"

This reverts commit 5da451d5a09798074dd1187ecb140cef775323a5.
cfort пре 1 година
родитељ
комит
845c932f15

+ 6 - 23
src/views/platform/office/bpmReceivedProcess/completed.vue

@@ -170,8 +170,7 @@ export default {
          */
         loadData () {
             this.loading = true
-            // handled(this.getFormatParams()).then(response => {
-            handled(this.getSearchFormData()).then(response => {
+            handled(this.getFormatParams()).then(response => {
                 const { data } = response || {}
                 data.dataResult.forEach((item, i) => {
                     item.createDept = this.getTaskInfo(item.subject)
@@ -184,28 +183,12 @@ export default {
                 this.loading = false
             })
         },
-        // getFormatParams () {
-        //     const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-        //     if (!params.hasOwnProperty('Q^inst.status_^S')) {
-        //         params['Q^inst.status_^NE'] = 'running'
-        //     }
-        //     return ActionUtils.formatParams(params, this.pagination, this.sorts)
-        // },
-        // 获取格式化参数
-        getSearchFormData () {
-            let params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-            params = {
-                ...params,
-                ...this.searchParams
+        getFormatParams () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            if (!params.hasOwnProperty('Q^inst.status_^S')) {
+                params['Q^inst.status_^NE'] = 'running'
             }
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^TYPE_ID_^S'] = this.typeId
-            }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts
-            )
+            return ActionUtils.formatParams(params, this.pagination, this.sorts)
         },
         /**
          * 处理按钮事件

+ 19 - 37
src/views/platform/office/bpmReceivedProcess/handled.vue

@@ -108,8 +108,7 @@ export default {
          */
         loadData () {
             this.loading = true
-            // handled(this.getFormatParams()).then(response => {
-            handled(this.getSearchFormData()).then(response => {
+            handled(this.getFormatParams()).then(response => {
                 const { data } = response || {}
                 data.dataResult.forEach((item, i) => {
                     item.createDept = this.getTaskInfo(item.subject)
@@ -122,42 +121,25 @@ export default {
                 this.loading = false
             })
         },
-        // /**
-        //  * 获取格式化参数
-        //  */
-        // getFormatParams () {
-        //     const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-        //     delete params['Q^inst.status_^SL']
-        //     delete params['Q^inst.status_^NE']
-        //     switch (params.end) {
-        //         case 'true':
-        //             params['Q^inst.status_^SL'] = 'end'
-        //             break
-        //         case 'false':
-        //             params['Q^inst.status_^NE'] = 'end'
-        //             break
-        //         default:
-        //             break
-        //     }
-        //     delete params.end
-        //     return ActionUtils.formatParams(params, this.pagination, this.sorts)
-        // },
-
-        // 获取格式化参数
-        getSearchFormData () {
-            let params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-            params = {
-                ...params,
-                ...this.searchParams
-            }
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^TYPE_ID_^S'] = this.typeId
+        /**
+         * 获取格式化参数
+         */
+        getFormatParams () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            delete params['Q^inst.status_^SL']
+            delete params['Q^inst.status_^NE']
+            switch (params.end) {
+                case 'true':
+                    params['Q^inst.status_^SL'] = 'end'
+                    break
+                case 'false':
+                    params['Q^inst.status_^NE'] = 'end'
+                    break
+                default:
+                    break
             }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts
-            )
+            delete params.end
+            return ActionUtils.formatParams(params, this.pagination, this.sorts)
         },
         /**
          * 处理按钮事件

+ 20 - 37
src/views/platform/office/bpmReceivedProcess/pendingManage/pending.vue

@@ -148,7 +148,7 @@ export default {
             listConfig: {
                 // 工具栏
                 toolbars: [
-                    { key: 'search' }
+                    { key: 'search' },
                     // {
                     //     key: 'agree',
                     //     label: '提交/通过',
@@ -209,8 +209,7 @@ export default {
          */
         loadData () {
             this.loading = true
-            // pending(this.getFormatParams()).then(response => {
-            pending(this.getSearchFormData()).then(response => {
+            pending(this.getFormatParams()).then(response => {
                 const { data } = response || {}
                 data.dataResult.forEach((item, i) => {
                     item.createDept = this.getTaskInfo(item.subject)
@@ -222,42 +221,26 @@ export default {
                 this.loading = false
             })
         },
-        // /**
-        //  * 获取格式化参数
-        //  */
-        // getFormatParams () {
-        //     const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-        //     if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
-        //         params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
-        //     }
-        //     let res = {}
-        //     if (params.hasOwnProperty('Q^temp.proc_def_name_^SL')) {
-        //         const temp = params['Q^temp.proc_def_name_^SL']
-        //         delete params['Q^temp.proc_def_name_^SL']
-        //         res = ActionUtils.formatParams(params, this.pagination, this.sorts)
-        //         res.customs = {
-        //             procDefName: temp
-        //         }
-        //     } else {
-        //         res = ActionUtils.formatParams(params, this.pagination, this.sorts)
-        //     }
-        //     return res
-        // },
-        // 获取格式化参数
-        getSearchFormData () {
-            let params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
-            params = {
-                ...params,
-                ...this.searchParams
+        /**
+         * 获取格式化参数
+         */
+        getFormatParams () {
+            const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
+            if (this.$utils.isNotEmpty(this.procDefIdSelect)) {
+                params['Q^temp.proc_def_key_^S'] = this.procDefIdSelect
             }
-            if (this.$utils.isNotEmpty(this.typeId)) {
-                params['Q^TYPE_ID_^S'] = this.typeId
+            let res = {}
+            if (params.hasOwnProperty('Q^temp.proc_def_name_^SL')) {
+                const temp = params['Q^temp.proc_def_name_^SL']
+                delete params['Q^temp.proc_def_name_^SL']
+                res = ActionUtils.formatParams(params, this.pagination, this.sorts)
+                res.customs = {
+                    procDefName: temp
+                }
+            } else {
+                res = ActionUtils.formatParams(params, this.pagination, this.sorts)
             }
-            return ActionUtils.formatParams(
-                params,
-                this.pagination,
-                this.sorts
-            )
+            return res
         },
         /**
          * 点击表格