Commit ad4af5ba authored by sixiaofeng's avatar sixiaofeng

1

parent 6ef451c3
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<main-page <main-page
left-arrow left-arrow
:loading="loading" :loading="loading"
@click-left="$router.push('/team/team/frame')" @click-left="$router.push('/team/team-frame')"
> >
<member-selector <member-selector
:show.sync="showMemberSelector" :show.sync="showMemberSelector"
......
...@@ -190,7 +190,7 @@ export default Vue.extend({ ...@@ -190,7 +190,7 @@ export default Vue.extend({
parentId: this.parentId, parentId: this.parentId,
entId: this.entId, entId: this.entId,
hasStaff: true, hasStaff: true,
isDirect: !this.ifContainChildDep isDirect: this.ifContainChildDep
}).then((res: any) => { }).then((res: any) => {
const { data } = res const { data } = res
this.loading = false this.loading = false
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<c-cell <c-cell
dot dot
title="上级部门" title="上级部门"
content="产品设计部" :content="parentDepName"
/> />
<!-- <switch-cell title="该部门包含子部门成员" :checked.sync="check" /> --> <!-- <switch-cell title="该部门包含子部门成员" :checked.sync="check" /> -->
<c-cell <c-cell
...@@ -110,27 +110,35 @@ export default Vue.extend({ ...@@ -110,27 +110,35 @@ export default Vue.extend({
leaders: [] as Array<Staff>, leaders: [] as Array<Staff>,
showContactSelector: false, showContactSelector: false,
contactSelectorTitle: '', contactSelectorTitle: '',
actionType: 'add' actionType: 'add',
parentDepName: ''
} }
}, },
created() { async created() {
this.depId = this.$route.params.id this.depId = this.$route.params.id
this.entId = JSON.parse(localStorage.getItem('ENT_INFO') || '{}').id this.entId = JSON.parse(localStorage.getItem('ENT_INFO') || '{}').id
this.getDepInfo() const dep = await this.getDepInfo(this.depId)
this.depInfo = dep
this.selectedMemberId = [this.depInfo.leaderId]
if (this.depInfo.parentId === '-1') {
this.parentDepName = JSON.parse(localStorage.getItem('ENT_INFO') as string).name
} else {
const parentDep = await this.getDepInfo(this.depInfo.parentId)
this.parentDepName = parentDep.name
}
this.getStaffInfo(this.depInfo.leaderId)
}, },
methods: { methods: {
getDepInfo() { getDepInfo(id: string) {
this.loading = true this.loading = true
this.$service.department.getDep({ return this.$service.department.getDep({
entId: this.entId, entId: this.entId,
id: this.depId id
}).then((res: any) => { }).then((res: any) => {
const { data } = res const { data } = res
this.loading = false this.loading = false
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
this.depInfo = data.data return data.data
this.selectedMemberId = [this.depInfo.leaderId]
this.getStaffInfo(this.depInfo.leaderId)
} else { } else {
this.$toast(data.msg) this.$toast(data.msg)
} }
......
...@@ -103,7 +103,7 @@ export default Vue.extend({ ...@@ -103,7 +103,7 @@ export default Vue.extend({
const res = JSON.parse(getUserInfo() || "{}") const res = JSON.parse(getUserInfo() || "{}")
console.log(res,typeof res,'哈哈哈'); console.log(res,typeof res,'哈哈哈');
this.entId = process.env.NODE_ENV==='production'?res.entId : '166961152260050944' this.entId = process.env.NODE_ENV==='production'?res.entId : '168309072074903552'
console.log('这里出来了么?',this.entId, getUserInfo(),'这里呢'); console.log('这里出来了么?',this.entId, getUserInfo(),'这里呢');
localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo())) localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment