Commit 53233522 authored by hanfeng zhang's avatar hanfeng zhang

Merge branch 'main' of gitlab.33.cn:HF_web/OKR

parents 1fe1f557 7478d2e5
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
dot dot
required required
title="入职时间" title="入职时间"
:content="formatDate(acceptJoin.joinTime || new Date().getTime(), 'YYYY-MM-DD')" :content="formatDate(acceptJoin.joinTime*1000 || new Date().getTime(), 'YYYY-MM-DD')"
@click="show = true" @click="show = true"
/> />
<van-calendar <van-calendar
...@@ -122,7 +122,7 @@ export default Vue.extend({ ...@@ -122,7 +122,7 @@ export default Vue.extend({
depId: '', depId: '',
entId: '', entId: '',
hash: '', hash: '',
joinTime: new Date().getTime(), joinTime: Math.round(new Date().getTime()/1000),
phone: '', phone: '',
position: '' position: ''
} }
...@@ -200,7 +200,7 @@ export default Vue.extend({ ...@@ -200,7 +200,7 @@ export default Vue.extend({
}, },
// 入职日期 // 入职日期
selectJoinTime(date: Date) { selectJoinTime(date: Date) {
this.acceptJoin.joinTime = new Date(date).getTime() this.acceptJoin.joinTime = Math.round(new Date(date).getTime()/1000)
this.show = false this.show = false
this.date = this.formatDate(date) this.date = this.formatDate(date)
}, },
...@@ -215,7 +215,7 @@ export default Vue.extend({ ...@@ -215,7 +215,7 @@ export default Vue.extend({
}).then(() => { }).then(() => {
this.acceptJoin.entId = this.entId this.acceptJoin.entId = this.entId
this.acceptJoin.depId = this.selectedDepId this.acceptJoin.depId = this.selectedDepId
this.acceptJoin.expiration = this.acceptJoin.joinTime + 6000000 this.acceptJoin.expiration = Math.round(new Date().getTime()/1000) + 24 * 60 * 60
this.acceptJoin.inviterId = process.env.NODE_ENV ==='production'? getPublicKey(): "1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR" this.acceptJoin.inviterId = process.env.NODE_ENV ==='production'? getPublicKey(): "1FKxgaEh5fuSm7a35BfUnKYAmradowpiTR"
this.acceptJoin.oaServer = localStorage.getItem('ENT_INFO')? JSON.parse(localStorage.getItem('ENT_INFO') as any).oaServer : 'http://172.16.101.107:20000' this.acceptJoin.oaServer = localStorage.getItem('ENT_INFO')? JSON.parse(localStorage.getItem('ENT_INFO') as any).oaServer : 'http://172.16.101.107:20000'
const {depId,entId,expiration,inviterId,joinTime,name,oaServer,phone,position} = this.acceptJoin const {depId,entId,expiration,inviterId,joinTime,name,oaServer,phone,position} = this.acceptJoin
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
{{ nav }} {{ nav }}
</div> </div>
</div> </div>
<template v-if="Object.keys(list).length > 0"> <template v-if="Object.keys(list).length > 0 || leaders.length > 0">
<!-- 主管负责人 --> <!-- 主管负责人 -->
<div class="leaders" v-if="leaders.length > 0"> <div class="leaders" v-if="leaders.length > 0">
<div <div
......
...@@ -121,7 +121,7 @@ export default Vue.extend({ ...@@ -121,7 +121,7 @@ export default Vue.extend({
this.loading = true this.loading = true
const {depId,entId,expiration,hash,inviterId,joinTime,name,oaServer,phone,position} = this.info as AcceptJoinDTO const {depId,entId,expiration,hash,inviterId,joinTime,name,oaServer,phone,position} = this.info as AcceptJoinDTO
let req = { let req = {
depId,entId,expiration: Math.round(Number(expiration)/1000) ,hash,inviterId,joinTime: Math.round(Number(joinTime)/1000),name,oaServer,phone,position depId,entId,expiration: Number(expiration) ,hash,inviterId,joinTime: Number(joinTime),name,oaServer,phone,position
} }
this.$service.enterprise.acceptJoin(req) this.$service.enterprise.acceptJoin(req)
.then((res: any) => { .then((res: any) => {
......
...@@ -103,7 +103,7 @@ export default Vue.extend({ ...@@ -103,7 +103,7 @@ export default Vue.extend({
}, },
computed:{ computed:{
getUserInfo(){ getUserInfo(){
return getUserInfo() return JSON.parse(getUserInfo())
} }
}, },
created() { created() {
......
...@@ -100,8 +100,7 @@ export default Vue.extend({ ...@@ -100,8 +100,7 @@ export default Vue.extend({
} }
}, },
mounted() { mounted() {
const res = JSON.parse(getUserInfo()) const res = JSON.parse(getUserInfo() || "{}")
this.entId = process.env.NODE_ENV==='production'?res.entId : '166961152260050944' this.entId = process.env.NODE_ENV==='production'?res.entId : '166961152260050944'
localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo())) localStorage.setItem('USR_INFO', JSON.stringify(getUserInfo()))
this.getEntInfo() this.getEntInfo()
......
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