Commit 5c22e59c authored by hanfeng zhang's avatar hanfeng zhang

321

parent 01bd501b
import moment from 'moment' import moment from 'moment'
export function formatDate(date: Date, type: string = 'YYYY-MM-DD HH:mm:ss') { export function formatDate(date: Date | number, type: string = 'YYYY-MM-DD HH:mm:ss') {
return moment(date).format(type) return moment(date).format(type)
} }
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
</div> </div>
<div class="px-4 pt-16 pb-20"> <div class="px-4 pt-16 pb-20">
<group-cell title="个人信息"> <group-cell title="">
<c-cell <c-cell
title="真实姓名" title="真实姓名"
title-class="text-sm text-text-secondary" title-class="text-sm text-text-secondary"
...@@ -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(info.joinTime, 'YYYY-MM-DD')}}</div> <div slot="content" class="text-text-primary">{{formatDate(Number(info.joinTime), 'YYYY-MM-DD')}}</div>
</c-cell> </c-cell>
<c-cell <c-cell
title="手机号" title="手机号"
...@@ -89,7 +89,7 @@ export default Vue.extend({ ...@@ -89,7 +89,7 @@ export default Vue.extend({
'c-cell': () => import('@/components/common/c-cell.vue') 'c-cell': () => import('@/components/common/c-cell.vue')
}, },
data() { data() {
const info: AcceptJoinDTO = { const info:AcceptJoinDTO = {
expiration: 0, expiration: 0,
inviterId: '', inviterId: '',
name: '', name: '',
...@@ -109,9 +109,11 @@ export default Vue.extend({ ...@@ -109,9 +109,11 @@ export default Vue.extend({
} }
}, },
created() { created() {
const query = this.$route.query.query || '{}' this.info = this.$route.query as unknown as AcceptJoinDTO
this.info = JSON.parse(query as string)
this.getDepInfo()
// item = JSON.parse(query as string)
this.getDepInfo(this.info)
}, },
methods: { methods: {
submit() { submit() {
...@@ -130,11 +132,11 @@ export default Vue.extend({ ...@@ -130,11 +132,11 @@ export default Vue.extend({
}) })
}, },
getDepInfo() { getDepInfo(item:AcceptJoinDTO) {
this.loading = true this.loading = true
this.$service.department.getDep({ this.$service.department.getDep({
entId: this.info.entId, entId: item.entId,
id: this.info.depId id: item.depId
}).then((res: any) => { }).then((res: any) => {
this.loading = false this.loading = false
const {data} = res const {data} = res
......
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
<div class=" flex-initial mx-3"> <div class=" flex-initial mx-3">
<code-icon :path="require('@/assets/icons/y-chat33.png')" class-name="h-9 w-9"/> Chat33 <code-icon :path="require('@/assets/icons/y-chat33.png')" class-name="h-9 w-9"/> Chat33
</div> </div>
<div class="flex-initial mx-3"> <!-- <div class="flex-initial mx-3">
<code-icon :path="require('@/assets/icons/y-weixin.png')" class-name="h-9 w-9"/>微信 <code-icon :path="require('@/assets/icons/y-weixin.png')" class-name="h-9 w-9"/>微信
</div> </div> -->
<div class="flex-initial mx-3" @click="saveQrcode"> <div class="flex-initial mx-3" @click="saveQrcode">
<code-icon :path="require('@/assets/icons/y-downlode.png')" class-name="h-9 w-9"/>保存 <code-icon :path="require('@/assets/icons/y-downlode.png')" class-name="h-9 w-9"/>保存
</div> </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