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

修改角色用户列表接口传参,首页bug修复

cfort пре 2 година
родитељ
комит
89ef7e1d7a

+ 10 - 11
src/views/platform/org/role/user-list.vue

@@ -61,8 +61,11 @@ export default {
     },
     data () {
         const { account = '', deptList = [] } = this.$store.getters
+        const { first = '', second = '' } = this.$store.getters.level
+        const level = second || first
         return {
             account,
+            level,
             deptList,
             selectorVisible: false,
             dialogLoading: false,
@@ -130,21 +133,13 @@ export default {
             this.loading = true
             queryPageList(this.getSearcFormData()).then(response => {
                 const { dataResult = [] } = response.data || {}
-                const newData = []
                 dataResult.forEach(item => {
                     if (item.positions) {
-                        const inner = this.deptList.some(i => item.positions.includes(i.positionId))
                         // 转换岗位路径
                         const path = this.getPositionsPath(item.positions)
                         this.$set(item, 'positionsPath', path)
-                        if (inner) {
-                            newData.push(item)
-                        }
                     }
                 })
-                if (this.account !== 'jinyuan') {
-                    response.data.dataResult = newData
-                }
                 ActionUtils.handleListData(this, response.data)
                 this.loading = false
             }).catch(() => {
@@ -155,9 +150,13 @@ export default {
          * 获取格式化参数
          */
         getSearcFormData () {
-            return ActionUtils.formatParams({
-                roleId: this.id
-            }, this.pagination, this.sorts)
+            const res = ActionUtils.formatParams({ roleId: this.id }, this.pagination, this.sorts)
+            if (this.account !== 'jinyuan') {
+                res.customs = {
+                    position: this.level
+                }
+            }
+            return res
         },
         /**
          * 处理分页事件

+ 1 - 1
src/views/system/dashboard/components/workbench.vue

@@ -405,7 +405,7 @@ export default {
                     dataResult.forEach(item => {
                         instList.push(item.bpmnInstId)
                     })
-                    const sql = `select b.bpmn_inst_id_, b.create_by_, a.name_ from ibps_bpm_inst b left join ibps_party_employee a on a.id_ = b.create_by_ where b.bpmn_inst_id_ in ('${instList.join(',')}') order by find_in_set(b.bpmn_inst_id_,'${instList.join(',')}')`
+                    const sql = `select b.bpmn_inst_id_, b.create_by_, a.name_ from ibps_bpm_inst b left join ibps_party_employee a on a.id_ = b.create_by_ where b.bpmn_inst_id_ in (${instList.length ? instList.join(',') : `''`}) order by find_in_set(b.bpmn_inst_id_,'${instList.join(',')}')`
                     const currentTime = Date.now()
                     this.$common.request('sql', sql).then(res => {
                         const data = res.variables && res.variables.data