Преглед на файлове

1156 用户管理列表调整

cyy преди 2 години
родител
ревизия
1664362889
променени са 5 файла, в които са добавени 70 реда и са изтрити 10 реда
  1. 2 1
      src/locales/en.json
  2. 2 1
      src/locales/ja.json
  3. 2 1
      src/locales/zh-CN.json
  4. 2 1
      src/locales/zh-TW.json
  5. 62 6
      src/views/platform/org/employee/list.vue

+ 2 - 1
src/locales/en.json

@@ -751,7 +751,8 @@
 					"name": "Name",
 					"name": "Name",
 					"orgPath": "Org path",
 					"orgPath": "Org path",
 					"status": "Status",
 					"status": "Status",
-					"wcAccount": "WeChat account"
+					"wcAccount": "WeChat account",
+					"job": "role"
 				},
 				},
 				"title": "Staff"
 				"title": "Staff"
 			},
 			},

+ 2 - 1
src/locales/ja.json

@@ -751,7 +751,8 @@
 					"name": "お名前",
 					"name": "お名前",
 					"orgPath": "帰属組織パス",
 					"orgPath": "帰属組織パス",
 					"status": "州",
 					"status": "州",
-					"wcAccount": "企業のWeChatアカウント"
+					"wcAccount": "企業のWeChatアカウント",
+					"job": "ポジションです"
 				},
 				},
 				"title": "従業員"
 				"title": "従業員"
 			},
 			},

+ 2 - 1
src/locales/zh-CN.json

@@ -751,7 +751,8 @@
 					"name": "姓名",
 					"name": "姓名",
 					"orgPath": "归属组织路径",
 					"orgPath": "归属组织路径",
 					"status": "状态",
 					"status": "状态",
-					"wcAccount": "企业微信账户"
+					"wcAccount": "企业微信账户",
+					"job": "角色"
 				},
 				},
 				"title": "员工"
 				"title": "员工"
 			},
 			},

+ 2 - 1
src/locales/zh-TW.json

@@ -751,7 +751,8 @@
 					"name": "姓名",
 					"name": "姓名",
 					"orgPath": "歸屬組織路徑",
 					"orgPath": "歸屬組織路徑",
 					"status": "狀態",
 					"status": "狀態",
-					"wcAccount": "企業微信賬戶"
+					"wcAccount": "企業微信賬戶",
+					"job": "角色"
 				},
 				},
 				"title": "員工"
 				"title": "員工"
 			},
 			},

+ 62 - 6
src/views/platform/org/employee/list.vue

@@ -19,7 +19,14 @@
             @action-event="handleAction"
             @action-event="handleAction"
             @sort-change="handleSortChange"
             @sort-change="handleSortChange"
             @pagination-change="handlePaginationChange"
             @pagination-change="handlePaginationChange"
-        />
+        >
+            <template slot="roleName" slot-scope="roleName">
+                <span class="huanRow">{{roleName.row.roleName}}</span>
+            </template>
+            <template slot="positionsPath" slot-scope="positionsPath">
+                <span class="huanRow">{{positionsPath.row.positionsPath}}</span>
+            </template>
+        </ibps-crud>
         <!-- 新增、编辑、明细 -->
         <!-- 新增、编辑、明细 -->
         <edit
         <edit
             :id="editId"
             :id="editId"
@@ -177,12 +184,18 @@ export default {
                         tags: genderOptions,
                         tags: genderOptions,
                         width: 90
                         width: 90
                     },
                     },
-                    // { prop: 'wcAccount', label: this.$t('platform.org.employee.prop.wcAccount'),width:120},
+                    { 
+                        prop: "roleName", 
+                        label: this.$t('platform.org.employee.prop.job'),
+                        width:180,
+                        slotName:"roleName"
+                    },
                     {
                     {
                         prop: 'positionsPath',
                         prop: 'positionsPath',
                         label: this.$t('platform.org.employee.prop.orgPath'),
                         label: this.$t('platform.org.employee.prop.orgPath'),
                         sortable: false,
                         sortable: false,
-                        minWidth: 200
+                        minWidth: 200,
+                        slotName:"positionsPath"
                     },
                     },
                     {
                     {
                         prop: 'status',
                         prop: 'status',
@@ -301,14 +314,16 @@ export default {
             sorts: {},
             sorts: {},
             moreSearchParams: {},
             moreSearchParams: {},
             dialogMoreSearchVisible: false,
             dialogMoreSearchVisible: false,
-            positionsList: []
+            positionsList: [],
+            roleList:[]
         }
         }
     },
     },
     created () {
     created () {
-        this.getOrg().then(res => {
+        Promise.all([this.getRole(),this.getOrg()]).then(([rep,res]) => {
             this.loadData()
             this.loadData()
             this.loadDisplayField()
             this.loadDisplayField()
         })
         })
+        console.log(genderOptions,statusOptions,'sdsadsadsadasd')
         // this.loadData()
         // this.loadData()
         // this.loadDisplayField()
         // this.loadDisplayField()
     },
     },
@@ -332,6 +347,11 @@ export default {
                         const path = this.getPositionsPath(item.positions)
                         const path = this.getPositionsPath(item.positions)
                         this.$set(item, 'positionsPath', path)
                         this.$set(item, 'positionsPath', path)
                     }
                     }
+                    if (item.job) {
+                        // 转角色名
+                        const name = this.getRoleName(item.job)
+                        this.$set(item, 'roleName', name)
+                    }
                 })
                 })
                 ActionUtils.handleListData(this, response.data)
                 ActionUtils.handleListData(this, response.data)
                 this.loading = false
                 this.loading = false
@@ -339,6 +359,19 @@ export default {
                 this.loading = false
                 this.loading = false
             })
             })
         },
         },
+        getRoleName(val){
+            let name=''
+            let nameArr = []
+            let valArr = val.split(',')
+            if(valArr.length!=0){
+                valArr.forEach((item) => {
+                    let it = this.roleList.find(i => i.id_ === item)
+                    nameArr.push(it.name_)
+                })
+                name = nameArr.join(',')
+            }
+            return name
+        },
         getPositionsName (valueList) {
         getPositionsName (valueList) {
             const postList = valueList.split(',')
             const postList = valueList.split(',')
             const list = []
             const list = []
@@ -567,12 +600,35 @@ export default {
                         this.$set(item, 'label', item.NAME_)
                         this.$set(item, 'label', item.NAME_)
                     })
                     })
                     this.positionsList = datas
                     this.positionsList = datas
-
                     this.listConfig.searchForm.forms[3].options = datas
                     this.listConfig.searchForm.forms[3].options = datas
                     resolve()
                     resolve()
                 })
                 })
             })
             })
+        },
+        // 获取角色的数据
+        getRole () {
+            return new Promise((resolve, reject) => {
+                const sql = `select id_,name_ FROM ibps_party_role`
+                this.$common.request('sql', sql).then((res) => {
+                    const datas = res.variables.data
+                    datas.forEach((item, index) => {
+                        this.$set(item, 'value', item.id_)
+                        this.$set(item, 'label', item.name_)
+                    })
+                    this.roleList = datas
+
+                    // this.listConfig.searchForm.forms[3].options = datas
+                    resolve()
+                })
+            })
         }
         }
     }
     }
 }
 }
 </script>
 </script>
+<style scoped>
+.huanRow{
+    display: inline-block;
+    width: 100%;
+    white-space: pre-line;
+}
+</style>