Browse Source

Merge branch 'master' of http://119.23.210.103:3000/wy/zdqy_firm_former

cfort 1 year ago
parent
commit
0b01f3c315

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

@@ -170,7 +170,8 @@ export default {
          */
         loadData () {
             this.loading = true
-            handled(this.getFormatParams()).then(response => {
+            // handled(this.getFormatParams()).then(response => {
+            handled(this.getSearchFormData()).then(response => {
                 const { data } = response || {}
                 data.dataResult.forEach((item, i) => {
                     item.createDept = this.getTaskInfo(item.subject)
@@ -183,12 +184,28 @@ 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'
+        // 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
             }
-            return ActionUtils.formatParams(params, this.pagination, this.sorts)
+            if (this.$utils.isNotEmpty(this.typeId)) {
+                params['Q^TYPE_ID_^S'] = this.typeId
+            }
+            return ActionUtils.formatParams(
+                params,
+                this.pagination,
+                this.sorts
+            )
         },
         /**
          * 处理按钮事件

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

@@ -108,7 +108,8 @@ export default {
          */
         loadData () {
             this.loading = true
-            handled(this.getFormatParams()).then(response => {
+            // handled(this.getFormatParams()).then(response => {
+            handled(this.getSearchFormData()).then(response => {
                 const { data } = response || {}
                 data.dataResult.forEach((item, i) => {
                     item.createDept = this.getTaskInfo(item.subject)
@@ -121,25 +122,42 @@ 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
+        // /**
+        //  * 获取格式化参数
+        //  */
+        // 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
             }
-            delete params.end
-            return ActionUtils.formatParams(params, this.pagination, this.sorts)
+            return ActionUtils.formatParams(
+                params,
+                this.pagination,
+                this.sorts
+            )
         },
         /**
          * 处理按钮事件

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

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