Parcourir la source

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

ZZJ il y a 2 ans
Parent
commit
bb27e70b4b

+ 8 - 8
src/business/platform/org/employee/constants/index.js

@@ -2,10 +2,10 @@
  * 参与者属性
  */
 export const partyTypeOptions = [
-    {
-        value: 'org',
-        label: '机构'
-    },
+    // {
+    //     value: 'org',
+    //     label: '机构'
+    // },
     {
         value: 'position',
         label: '部门'
@@ -13,11 +13,11 @@ export const partyTypeOptions = [
     {
         value: 'role',
         label: '角色'
-    },
-    {
-        value: 'group',
-        label: '用户组'
     }
+    // {
+    //     value: 'group',
+    //     label: '用户组'
+    // }
 ]
 /**
  * 人员状态

+ 11 - 4
src/business/platform/org/employee/panel.vue

@@ -150,7 +150,7 @@ export default {
             partyTypeOptions: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions : partyTypeOptions,
             statusOptions: statusOptions,
             genderOptions: genderOptions,
-            partyType: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions[0].value : 'org',
+            partyType: this.$utils.isNotEmpty(this.customPartyTypeOptions) ? this.customPartyTypeOptions[0].value : 'position',
             // inclueChild: true,
             partyId: '',
             treeDatas: [],
@@ -341,20 +341,27 @@ export default {
          * 获取查询条件格式化参数
          */
         getFormatParams (flag = '0') {
+            const storeGetters = this.$store.getters
             const params = this.$refs['crud'] ? this.$refs['crud'].getSearcFormData() : {}
             const key = this.partyType === 'org' ? 'orgId' : this.partyType === 'position' ? 'positionId' : this.partyType === 'role' ? 'roleId' : this.partyType === 'group' ? 'groupId' : ''
+            const deptLists = storeGetters.deptList.map((m) => {
+                return m.positionId
+            })
             if (this.showTree) {
                 if (this.$utils.isNotEmpty(this.partyId) || this.currentOrgIdValue !== '') {
                     if (this.partyId !== 0 && this.partyId !== '0') {
                         params[key] = this.partyId === '' ? this.currentOrgIdValue : this.partyId
                     }
-
                     if (!this.partyId && this.partyTypeId === '2' && this.partyType === 'position') {
-                        const position = this.$store.getters.userInfo.employee.positions
+                        const position = storeGetters.userInfo.employee.positions
                         params.positionId = position
                     }
                 } else {
-                    params[key] = this.partyTypeId === '1' ? '' : this.partyTypeId
+                    if (this.partyType === 'position') {
+                        params[key] = this.partyTypeId ? (this.partyTypeId === '1' ? '' : this.partyTypeId) : deptLists.join(',')
+                    } else {
+                        params[key] = this.partyTypeId === '1' ? '' : this.partyTypeId
+                    }
                 }
             }
             if (this.seetingSearchPartyType === 'position') {