Commit ffe32aed authored by sixiaofeng's avatar sixiaofeng

1

parent 834d0ece
...@@ -114,3 +114,14 @@ export function getLeaders(arr: Array<Staff>) { ...@@ -114,3 +114,14 @@ export function getLeaders(arr: Array<Staff>) {
if (typeof arr === 'undefined' || arr.length === 0) return [] if (typeof arr === 'undefined' || arr.length === 0) return []
return arr.filter((item: Staff) => item.role !== Role.COMMON_MEMBER).sort((a, b) => a.role - b.role) return arr.filter((item: Staff) => item.role !== Role.COMMON_MEMBER).sort((a, b) => a.role - b.role)
} }
export function uniqueArr(arr: Array<Staff>) {
if (typeof arr === 'undefined' || arr.length === 0) return []
const res = new Map()
return arr.filter(item => {
if (!res.has(item.id)) {
res.set(item.id, true)
return item
}
})
}
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<main-page <main-page
left-arrow left-arrow
:loading="loading" :loading="loading"
@click-left="$router.go(-1)" @click-left="$router.push('/team/team/frame')"
> >
<member-selector <member-selector
:show.sync="showMemberSelector" :show.sync="showMemberSelector"
......
...@@ -196,7 +196,7 @@ export default Vue.extend({ ...@@ -196,7 +196,7 @@ export default Vue.extend({
} }
}, },
handleClickLeft() { handleClickLeft() {
this.$router.go(-1) this.$router.push('/team/team-frame')
}, },
// 入职日期 // 入职日期
selectJoinTime(date: Date) { selectJoinTime(date: Date) {
......
...@@ -198,6 +198,9 @@ export default Vue.extend({ ...@@ -198,6 +198,9 @@ export default Vue.extend({
this.currentDep = data.data.dep this.currentDep = data.data.dep
// 通讯录 // 通讯录
this.contacts = data.data.staffList || [] this.contacts = data.data.staffList || []
if (typeof data.data.leader !== 'undefined') {
this.contacts.push(data.data.leader)
}
// 部门树 // 部门树
const depTree = data.data.dep const depTree = data.data.dep
depTree.children = data.data.subDepList depTree.children = data.data.subDepList
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
import Vue, {PropType} from 'vue' import Vue, {PropType} from 'vue'
import { Staff, Contacts } from '@/Interface' import { Staff, Contacts } from '@/Interface'
import { Role } from '@/service/moudles/service.dto' import { Role } from '@/service/moudles/service.dto'
import { getContacts, getLeaders } from '@/util/Contact' import { getContacts, getLeaders, uniqueArr } from '@/util/Contact'
export default Vue.extend({ export default Vue.extend({
props: { props: {
...@@ -139,10 +139,10 @@ export default Vue.extend({ ...@@ -139,10 +139,10 @@ export default Vue.extend({
}, },
computed: { computed: {
leaders() { leaders() {
return getLeaders(this.contactList) return getLeaders(uniqueArr(this.contactList))
}, },
filteredContacts() { filteredContacts() {
return getContacts(this.contactList.filter((staff: Staff) => staff.role === Role.COMMON_MEMBER) || []) return getContacts(uniqueArr(this.contactList).filter((staff: Staff) => staff.role === Role.COMMON_MEMBER) || [])
}, },
navs() { navs() {
let arr: Array<string> = [] let arr: Array<string> = []
......
...@@ -106,7 +106,7 @@ export default Vue.extend({ ...@@ -106,7 +106,7 @@ export default Vue.extend({
memberSelectorTitle: '', memberSelectorTitle: '',
multiple: false, multiple: false,
contacts: [], contacts: [] as Array<Staff>,
leaders: [] as Array<Staff>, leaders: [] as Array<Staff>,
showContactSelector: false, showContactSelector: false,
contactSelectorTitle: '', contactSelectorTitle: '',
...@@ -164,8 +164,10 @@ export default Vue.extend({ ...@@ -164,8 +164,10 @@ export default Vue.extend({
this.loading = false this.loading = false
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
// 通讯录 // 通讯录
console.log(data.data.staffList, 'lll')
this.contacts = data.data.staffList || [] this.contacts = data.data.staffList || []
if (typeof data.data.leader !== 'undefined') {
this.contacts.push(data.data.leader)
}
// 部门树 // 部门树
} else { } else {
this.$toast(data.msg) this.$toast(data.msg)
...@@ -208,7 +210,7 @@ export default Vue.extend({ ...@@ -208,7 +210,7 @@ export default Vue.extend({
this.loading=false this.loading=false
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
this.$toast('删除成功') this.$toast('删除成功')
this.$router.go(-1) this.$router.push('/team/team-frame')
} else { } else {
this.$toast(data.msg) this.$toast(data.msg)
} }
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
</div> </div>
<div class="top-28 px-4 w-full absolute top-10"> <div class="top-28 px-4 w-full absolute top-10">
<div class="bg-white w-full rounded pt-8 pb-4 flex flex-col items-center shadow-bg"> <div class="bg-white w-full rounded pt-8 pb-4 flex flex-col items-center shadow-bg">
<div class="font-medium">杭州复杂美科技有限公司</div> <div class="font-medium">{{entName}}</div>
<div class="font-medium text-sm text-text-secondary mt-0.5">团队号 HZFZM0001</div> <!-- <div class="font-medium text-sm text-text-secondary mt-0.5">团队号 HZFZM0001</div> -->
<!-- <div class="h-20 overflow-auto text-xs text-text-secondary px-4 mt-3.5"> <!-- <div class="h-20 overflow-auto text-xs text-text-secondary px-4 mt-3.5">
公司成立于2008年,2013 年启动区块链、智能合约的研发与创新,2014年申请区块链发明专利:钱包找回功能。已申请区块链相关专利500余项,其中已获得授权超80项,2019年据德温特专利家族统计,复杂美区块链发明专利排名位于全球第三,仅次于阿里巴巴和IBM。 公司总部位于杭州,并在南京、广州、海南设有分部。目前,公司员工100余人,其中80%左右为技术人员,吸引了一批甲骨文、阿里、华为程序员。公司与多家世界500强开展区块链项目合作,在票据、供应链金融、积分、仓单有区块链应用落地。 2018年11月,复杂美区块链Chain33在Github上开源,是较早落地运行的平行链架构系统,并基于模块设计可协作开发,大幅降低区块链的开发维护成本,实现快捷易用的跨链交易,有近100个平行链项目落地,去中心化交易、去中心化社交、去中心化电商、去中心化溯源存证、去中心化借贷等一系列应用。 公司成立于2008年,2013 年启动区块链、智能合约的研发与创新,2014年申请区块链发明专利:钱包找回功能。已申请区块链相关专利500余项,其中已获得授权超80项,2019年据德温特专利家族统计,复杂美区块链发明专利排名位于全球第三,仅次于阿里巴巴和IBM。 公司总部位于杭州,并在南京、广州、海南设有分部。目前,公司员工100余人,其中80%左右为技术人员,吸引了一批甲骨文、阿里、华为程序员。公司与多家世界500强开展区块链项目合作,在票据、供应链金融、积分、仓单有区块链应用落地。 2018年11月,复杂美区块链Chain33在Github上开源,是较早落地运行的平行链架构系统,并基于模块设计可协作开发,大幅降低区块链的开发维护成本,实现快捷易用的跨链交易,有近100个平行链项目落地,去中心化交易、去中心化社交、去中心化电商、去中心化溯源存证、去中心化借贷等一系列应用。
</div> --> </div> -->
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
title="入职时间" title="入职时间"
title-class="text-sm text-text-secondary" title-class="text-sm text-text-secondary"
> >
<div slot="content" class="text-text-primary">{{formatDate(Number(info.joinTime), 'YYYY-MM-DD')}}</div> <div slot="content" class="text-text-primary">{{formatDate(Number(info.joinTime)*1000, 'YYYY-MM-DD')}}</div>
</c-cell> </c-cell>
<c-cell <c-cell
title="手机号" title="手机号"
...@@ -106,6 +106,7 @@ export default Vue.extend({ ...@@ -106,6 +106,7 @@ export default Vue.extend({
formatDate, formatDate,
info, info,
departName: '', departName: '',
entName: '',
loading: false loading: false
} }
}, },
...@@ -113,6 +114,7 @@ export default Vue.extend({ ...@@ -113,6 +114,7 @@ export default Vue.extend({
this.info = this.$route.query as unknown as AcceptJoinDTO this.info = this.$route.query as unknown as AcceptJoinDTO
this.getDepInfo(this.info) this.getDepInfo(this.info)
}, },
methods: { methods: {
appNavBack, appNavBack,
...@@ -134,7 +136,6 @@ export default Vue.extend({ ...@@ -134,7 +136,6 @@ export default Vue.extend({
this.$toast(data.msg) this.$toast(data.msg)
} }
}) })
}, },
getDepInfo(item:AcceptJoinDTO) { getDepInfo(item:AcceptJoinDTO) {
this.loading = true this.loading = true
...@@ -145,10 +146,21 @@ export default Vue.extend({ ...@@ -145,10 +146,21 @@ export default Vue.extend({
this.loading = false this.loading = false
const {data} = res const {data} = res
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
console.log(data.data.name, 'depIndo')
this.departName = data.data.name this.departName = data.data.name
} }
}) })
},
getEntInfo(item: AcceptJoinDTO) {
this.loading = true
this.$service.enterprise.getEnterpriseInfo({
id: item.entId
}).then((res: any) => {
this.loading = false
const {data} = res
if (data.code === this.$global.success) {
this.entName = data.data.name
}
})
} }
} }
}) })
......
...@@ -167,7 +167,10 @@ export default Vue.extend({ ...@@ -167,7 +167,10 @@ export default Vue.extend({
if (data.code === this.$global.success) { if (data.code === this.$global.success) {
this.currentDep = data.data.dep this.currentDep = data.data.dep
// 通讯录 // 通讯录
this.contacts = data.data.staffList this.contacts = data.data.staffList || []
if (typeof data.data.leader !== 'undefined') {
this.contacts.push(data.data.leader)
}
// 部门树 // 部门树
const depTree = data.data.dep const depTree = data.data.dep
depTree.children = data.data.subDepList depTree.children = data.data.subDepList
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="flex-shrink-0 w-12">部门:</div> <div class="flex-shrink-0 w-12">部门:</div>
<div class="flex-1"> {{depInfo.name}}</div> <div class="flex-1"> {{depInfo.name}}</div>
</div> </div>
<div>{{ formatDate(joinInfo.joinTime, 'YYYY-MM-DD') || '2021-09-05' }}</div> <div>{{ formatDate(Number(joinInfo.joinTime)*1000, 'YYYY-MM-DD') || '2021-09-05' }}</div>
</div> </div>
</div> </div>
<div class=" text-center text-gray-400 pb-8 pt-4">扫描二维码加入我们{{entName}}的团队</div> <div class=" text-center text-gray-400 pb-8 pt-4">扫描二维码加入我们{{entName}}的团队</div>
......
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