|
|
@@ -19,7 +19,14 @@
|
|
|
@action-event="handleAction"
|
|
|
@sort-change="handleSortChange"
|
|
|
@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
|
|
|
:id="editId"
|
|
|
@@ -177,12 +184,18 @@ export default {
|
|
|
tags: genderOptions,
|
|
|
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',
|
|
|
label: this.$t('platform.org.employee.prop.orgPath'),
|
|
|
sortable: false,
|
|
|
- minWidth: 200
|
|
|
+ minWidth: 200,
|
|
|
+ slotName:"positionsPath"
|
|
|
},
|
|
|
{
|
|
|
prop: 'status',
|
|
|
@@ -301,14 +314,16 @@ export default {
|
|
|
sorts: {},
|
|
|
moreSearchParams: {},
|
|
|
dialogMoreSearchVisible: false,
|
|
|
- positionsList: []
|
|
|
+ positionsList: [],
|
|
|
+ roleList:[]
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- this.getOrg().then(res => {
|
|
|
+ Promise.all([this.getRole(),this.getOrg()]).then(([rep,res]) => {
|
|
|
this.loadData()
|
|
|
this.loadDisplayField()
|
|
|
})
|
|
|
+ console.log(genderOptions,statusOptions,'sdsadsadsadasd')
|
|
|
// this.loadData()
|
|
|
// this.loadDisplayField()
|
|
|
},
|
|
|
@@ -332,6 +347,11 @@ export default {
|
|
|
const path = this.getPositionsPath(item.positions)
|
|
|
this.$set(item, 'positionsPath', path)
|
|
|
}
|
|
|
+ if (item.job) {
|
|
|
+ // 转角色名
|
|
|
+ const name = this.getRoleName(item.job)
|
|
|
+ this.$set(item, 'roleName', name)
|
|
|
+ }
|
|
|
})
|
|
|
ActionUtils.handleListData(this, response.data)
|
|
|
this.loading = false
|
|
|
@@ -339,6 +359,19 @@ export default {
|
|
|
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) {
|
|
|
const postList = valueList.split(',')
|
|
|
const list = []
|
|
|
@@ -567,12 +600,35 @@ export default {
|
|
|
this.$set(item, 'label', item.NAME_)
|
|
|
})
|
|
|
this.positionsList = datas
|
|
|
-
|
|
|
this.listConfig.searchForm.forms[3].options = datas
|
|
|
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>
|
|
|
+<style scoped>
|
|
|
+.huanRow{
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ white-space: pre-line;
|
|
|
+}
|
|
|
+</style>
|