|
|
@@ -61,6 +61,16 @@
|
|
|
@input="(data) => (employee.posItemList = data)"
|
|
|
/>
|
|
|
</el-tab-pane>
|
|
|
+ <el-tab-pane v-if="isDuty" label="岗位信息" name="duty-info">
|
|
|
+ <duty-info
|
|
|
+ ref="dutyInfo"
|
|
|
+ :span="span"
|
|
|
+ :readonly="readonly"
|
|
|
+ :org-id="dutyId"
|
|
|
+ :data="employee.dutyItemList"
|
|
|
+ @input="(data) => (employee.dutyItemList = data)"
|
|
|
+ />
|
|
|
+ </el-tab-pane>
|
|
|
<el-tab-pane
|
|
|
v-if="!infoIncludes('role-info')"
|
|
|
label="角色信息"
|
|
|
@@ -119,6 +129,7 @@ import ExtAttr from './ext-attr'
|
|
|
import OrgInfo from './org-info'
|
|
|
import PositionInfo from './position-info'
|
|
|
import RoleInfo from './role-info'
|
|
|
+import DutyInfo from './duty-info'
|
|
|
import GroupInfo from './group-info'
|
|
|
import PersonalCode from './personal-qrcode'
|
|
|
import { encryptByAes } from '@/utils/encrypt'
|
|
|
@@ -130,6 +141,7 @@ export default {
|
|
|
OrgInfo,
|
|
|
PositionInfo,
|
|
|
RoleInfo,
|
|
|
+ DutyInfo,
|
|
|
GroupInfo,
|
|
|
PersonalCode
|
|
|
},
|
|
|
@@ -152,11 +164,13 @@ export default {
|
|
|
span: [Number, String]
|
|
|
},
|
|
|
data() {
|
|
|
- const { isSuper } = this.$store.getters
|
|
|
+ const { isSuper, setting } = this.$store.getters
|
|
|
return {
|
|
|
isSuper,
|
|
|
info: [],
|
|
|
orgId: '',
|
|
|
+ dutyId: '',
|
|
|
+ isDuty: setting?.duty?.use || false,
|
|
|
dialogLoading: false,
|
|
|
dialogVisible: false,
|
|
|
activeName: 'basic-info',
|
|
|
@@ -175,6 +189,7 @@ export default {
|
|
|
attrItemList: [], // 扩展属性
|
|
|
groupID: '', // 组织ID
|
|
|
posItemList: [],
|
|
|
+ dutyItemList: [],
|
|
|
roleItemList: [],
|
|
|
userGroupItemList: [],
|
|
|
orgItem: {}, // 组织全部信息
|
|
|
@@ -216,7 +231,7 @@ export default {
|
|
|
},
|
|
|
ceroParams: {
|
|
|
handler(val, oldVal) {
|
|
|
- if (val && val !== {}) {
|
|
|
+ if (val && val != {}) {
|
|
|
this.orgId = val.groundId
|
|
|
}
|
|
|
},
|
|
|
@@ -414,6 +429,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
+ // console.log(this.formId, vo)
|
|
|
|
|
|
if (this.formId) {
|
|
|
update(vo)
|
|
|
@@ -554,6 +570,9 @@ export default {
|
|
|
this.employee.orgItem = response.variables.partyOrg || {}
|
|
|
this.employee.attrItemList = response.variables.partyAttrs || []
|
|
|
this.employee.posItemList = response.variables.partyPositions || []
|
|
|
+ this.employee.dutyItemList = this.getDutyData(
|
|
|
+ response.variables.partyUserPosition || []
|
|
|
+ )
|
|
|
this.employee.roleItemList = response.variables.partyRoles || []
|
|
|
this.employee.userGroupItemList = response.variables.partyGroups || []
|
|
|
if (this.isSuper) {
|
|
|
@@ -593,14 +612,15 @@ export default {
|
|
|
? this.employee.password
|
|
|
: this.defaultEmployee.password
|
|
|
vo.partyEmployeePo.groupID =
|
|
|
- this.ceroParams !== {} && this.ceroParams
|
|
|
+ this.ceroParams != {} && this.ceroParams
|
|
|
? this.ceroParams.groundId
|
|
|
: this.formatOrgData()
|
|
|
vo.positionVoList = this.formatPositionData()
|
|
|
+ vo.partyPositionUser = this.formatDutyData()
|
|
|
vo.roleVoList = this.formatRoleData()
|
|
|
vo.attrValueVoList = this.employee.attrItemList
|
|
|
vo.userGroupPoList = this.formatUserGroupData()
|
|
|
- if (this.ceroParams !== {} && this.ceroParams) {
|
|
|
+ if (this.ceroParams != {} && this.ceroParams) {
|
|
|
vo.partyEmployeePo.prem = this.ceroParams.prem
|
|
|
}
|
|
|
return vo
|
|
|
@@ -620,6 +640,18 @@ export default {
|
|
|
}
|
|
|
return result
|
|
|
},
|
|
|
+ formatDutyData() {
|
|
|
+ const result = []
|
|
|
+ const list = this.employee.dutyItemList
|
|
|
+ if (this.$utils.isEmpty(list)) return result
|
|
|
+ for (const variable of list) {
|
|
|
+ const tmp = { positionName: variable.name }
|
|
|
+ tmp['positionType'] = 'responsibility'
|
|
|
+ tmp['dataType'] = variable.isMainPost === 'Y' ? 'mainResp' : ''
|
|
|
+ result.push(tmp)
|
|
|
+ }
|
|
|
+ return result
|
|
|
+ },
|
|
|
formatRoleData() {
|
|
|
const result = []
|
|
|
const list = this.employee.roleItemList
|
|
|
@@ -678,6 +710,17 @@ export default {
|
|
|
updList: [obj]
|
|
|
}
|
|
|
this.$common.request('update', params)
|
|
|
+ },
|
|
|
+ getDutyData(data) {
|
|
|
+ const result = []
|
|
|
+
|
|
|
+ if (this.$utils.isEmpty(data)) return result
|
|
|
+ for (const variable of data) {
|
|
|
+ const tmp = { name: variable.positionName, id: variable.id }
|
|
|
+ tmp['isMainPost'] = variable.dataType === 'mainResp' ? 'Y' : 'N'
|
|
|
+ result.push(tmp)
|
|
|
+ }
|
|
|
+ return result
|
|
|
}
|
|
|
}
|
|
|
}
|